Re: [PATCH][next] qed/qed_ll2: Replace one-element array with flexible-array member

2020-09-29 Thread Gustavo A. R. Silva
On Mon, Sep 28, 2020 at 06:48:14PM -0700, David Miller wrote: > From: "Gustavo A. R. Silva" > Date: Mon, 28 Sep 2020 10:16:17 -0500 > > > 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 > > shoul

Re: [PATCH][next] qed/qed_ll2: Replace one-element array with flexible-array member

2020-09-28 Thread David Miller
From: "Gustavo A. R. Silva" Date: Mon, 28 Sep 2020 10:16:17 -0500 > 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 > styl

[PATCH][next] qed/qed_ll2: Replace one-element array with flexible-array member

2020-09-28 Thread Gustavo A. R. Silva
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]. Refacto