[PATCH 3/7 v2] nvme-fabrics: Add FC transport FC-NVME definitions
James Smart
james.smart at broadcom.com
Tue Oct 18 10:59:43 PDT 2016
On 10/12/2016 1:58 AM, Christoph Hellwig wrote:
>
>> +/* fills in length of a descriptor. Struture minus descriptor header */
>> +#define FCNVME_LSDESC_LEN(lsdesc) \
>> + cpu_to_be32(sizeof(lsdesc) - (2*(sizeof(u32))))
> Make this an inline function and use spaces between the operators,
> please.
>
Christoph,
This can't be an inline - the "lsdesc" field is a type declaration
("struct x") and varies. That's the purpose of the define: so it can be
applied to different structures- e.g. FCNVME_LSDESC_LEN(struct foo) and
FCNVME_LSDESC_LEN(struct bar)
I'll adjust for the spacing, but will leave as a define.
-- james
More information about the Linux-nvme
mailing list