lkml.org 
[lkml]   [2021]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH][next] cifs: cifspdu.h: Replace one-element array with flexible-array member
From
Date


On 3/26/21 10:54, Aurélien Aptel wrote:
> "Gustavo A. R. Silva" <gustavoars@kernel.org> writes:
>> There is a regular need in the kernel to provide a way to declare having
>> a dynamically sized set of trailing elements in a structure. Kernel code
>> should always use “flexible array members”[1] for these cases. The older
>> style of one-element or zero-length arrays should no longer be used[2].
>
> I've checked the usages of the struct, looks OK (we don't allocate it
> directly, we use memory from the small/big buff pools).

Awesome. :)

> Reviewed-by: Aurelien Aptel <aaptel@suse.com>

Thank you, Aurelien.
--
Gustavo

\
 
 \ /
  Last update: 2021-03-26 17:38    [W:0.096 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site