Re: [bug report] scsi: mpt3sas: Added support for nvme encapsulated request message.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 07, 2017 at 10:29:20AM -0700, Sathya Prakash Veerichetty wrote:
> Dan,
> The MPI structures are of variable length and can go up to a maximum of
> 128 bytes (a MPI frame size) and as MPI standard the variable length MPI
> structures are left out with the last element as a single dword array.
> Can we ignore the warning?

Yeah.  These are a one time email but eventually other people running
static checkers are going to be confused as well.

> If not we need to modify the MPI structure to
> have the NVMe_Command array to the maximum size of the frame (which is
> typically 128 but can change across hardware generations)

To be honest, to declaring arrays as their maximum size is a pretty
common idiom...

	U8      NVMe_Command[4];                /*0x20 */

What does the 4 *mean* in this context?  As a human being, I would
understand that to be a 4 byte array, but it's clearly not.  You're
saying it's supposed to be a single dword array but why???  Is there
something special and mandatory stored in the first 4 bytes?  Why can't
it just be a zero size array?

It would help if there were at least a comment or something.

regards,
dan carpenter




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux