Re: [PATCH][next] mei: Avoid the use of one-element arrays

2020-07-14 Thread Gustavo A. R. Silva
On Tue, Jul 14, 2020 at 07:57:51PM +, Winkler, Tomas wrote: > > > > On Tue, Jul 14, 2020 at 05:54:32PM +, Winkler, Tomas wrote: > > > > > > > > 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. > >

RE: [PATCH][next] mei: Avoid the use of one-element arrays

2020-07-14 Thread Winkler, Tomas
> > On Tue, Jul 14, 2020 at 05:54:32PM +, Winkler, Tomas wrote: > > > > > > 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 > >

Re: [PATCH][next] mei: Avoid the use of one-element arrays

2020-07-14 Thread Gustavo A. R. Silva
On Tue, Jul 14, 2020 at 05:54:32PM +, Winkler, Tomas wrote: > > > > 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 > > or, as

RE: [PATCH][next] mei: Avoid the use of one-element arrays

2020-07-14 Thread Winkler, Tomas
> > 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 > or, as in this particular case, replace the one-element array with a simple > va