-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 structure. Notice
that `struct hw_atl_utils_fw_rpc` ends in a flexible-array member
through `struct offload_info fw2x_offloads;`

Fix the following warnings:
drivers/net/ethernet/aquantia/atlantic/aq_hw.h:197:36: warning: structure 
containing a flexible array member is not at the end of another structure 
[-Wflex-array-member-not-at-end]
drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_hw.h:197:36: 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]>
---
 drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h 
b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
index f010bda61c96..a66cd784f90e 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
@@ -194,10 +194,12 @@ struct aq_hw_s {
        u32 rpc_addr;
        u32 settings_addr;
        u32 rpc_tid;
-       struct hw_atl_utils_fw_rpc rpc;
        s64 ptp_clk_offset;
        u16 phy_id;
        void *priv;
+
+       /* Must be last - ends in a flex-array member. */
+       struct hw_atl_utils_fw_rpc rpc;
 };
 
 struct aq_ring_s;
-- 
2.34.1


Reply via email to