[PATCH][next] net: airoha: Avoid -Wflex-array-member-not-at-end warning

Simon Horman horms at kernel.org
Tue Sep 23 11:55:25 PDT 2025


On Mon, Sep 22, 2025 at 04:08:21PM +0200, Gustavo A. R. Silva wrote:
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
> 
> Move the conflicting declaration to the end of the corresponding
> structure. Notice that `struct airoha_foe_entry` is a flexible
> structure, this is a structure that contains a flexible-array
> member.
> 
> Fix the following warning:
> 
> drivers/net/ethernet/airoha/airoha_eth.h:474:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

FWIIW, I was able to reproduce this locally.
And it goes away with this patch applied.

> 
> Signed-off-by: Gustavo A. R. Silva <gustavoars at kernel.org>
> ---
>  drivers/net/ethernet/airoha/airoha_eth.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Simon Horman <horms at kernel.org>

...



More information about the linux-arm-kernel mailing list