0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2025-10-31 11:35:51 +00:00
Files
openwrt/target/linux/airoha/patches-6.12/092-v6.18-net-airoha-Avoid-Wflex-array-member-not-at-end-warni.patch
Christian Marangi 46a454fb9b airoha: backport upstream patch for AN7583 Ethernet support
Backport upstream patch for AN7583 Ethernet support. While at it also
backport some additional fixes required to apply the AN7583 patches
cleanly.

Refresh all affected patch automatically (aside from the XSI patch that
changed the implementation)

Link: https://github.com/openwrt/openwrt/pull/20489
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-22 12:31:21 +02:00

46 lines
1.5 KiB
Diff

From 09630ab91d840416b0178f3660afa4eebce24286 Mon Sep 17 00:00:00 2001
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Date: Mon, 22 Sep 2025 16:08:21 +0200
Subject: [PATCH] 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 <gustavoars@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/aNFYVYLXQDqm4yxb@kspp
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/airoha/airoha_eth.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/net/ethernet/airoha/airoha_eth.h
+++ b/drivers/net/ethernet/airoha/airoha_eth.h
@@ -471,7 +471,6 @@ struct airoha_flow_table_entry {
};
};
- struct airoha_foe_entry data;
struct hlist_node l2_subflow_node; /* PPE L2 subflow entry */
u32 hash;
@@ -480,6 +479,9 @@ struct airoha_flow_table_entry {
struct rhash_head node;
unsigned long cookie;
+
+ /* Must be last --ends in a flexible-array member. */
+ struct airoha_foe_entry data;
};
struct airoha_wdma_info {