Skip to content

Commit 09630ab

Browse files
GustavoARSilvakuba-moo
authored andcommitted
net: airoha: Avoid -Wflex-array-member-not-at-end warning
-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] Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/aNFYVYLXQDqm4yxb@kspp Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b650bf0 commit 09630ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/airoha/airoha_eth.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@ struct airoha_flow_table_entry {
471471
};
472472
};
473473

474-
struct airoha_foe_entry data;
475474
struct hlist_node l2_subflow_node; /* PPE L2 subflow entry */
476475
u32 hash;
477476

@@ -480,6 +479,9 @@ struct airoha_flow_table_entry {
480479

481480
struct rhash_head node;
482481
unsigned long cookie;
482+
483+
/* Must be last --ends in a flexible-array member. */
484+
struct airoha_foe_entry data;
483485
};
484486

485487
struct airoha_wdma_info {

0 commit comments

Comments
 (0)