[PATCH] nvmet: prefer flex_array_size and struct_size over open coded arithmetic

Chaitanya Kulkarni chaitanyak at nvidia.com
Tue Oct 26 17:13:42 PDT 2021


On 10/24/21 10:29 AM, Len Baker wrote:
> External email: Use caution opening links or attachments
> 
> 
> In an effort to avoid open-coded arithmetic in the kernel [1], use the
> flex_array_size() and struct_size() helpers instead of an open-coded
> calculation.
> 
> [1] https://github.com/KSPP/linux/issues/160
> 
> Signed-off-by: Len Baker <len.baker at gmx.com>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>




More information about the Linux-nvme mailing list