[<prev] [next>] [day] [month] [year] [list]
Message-ID: <aR2I9Sere0W-4VZz@kspp>
Date: Wed, 19 Nov 2025 18:08:05 +0900
From: "Gustavo A. R. Silva" <gustavoars@...nel.org>
To: Jes Sorensen <Jes.Sorensen@...il.com>
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
linux-hardening@...r.kernel.org
Subject: [PATCH][next] wifi: rtl8xxxu: Avoid -Wflex-array-member-not-at-end
warnings
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Move the conflicting declarations to the end of the corresponding
structures. Notice that `struct urb` is a flexible structure, this
is a structure that contains a flexible-array member.
With these changes fix the following warnings:
9 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h:1951:20: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
9 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h:1945:20: 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@...nel.org>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
index f42463e595cc..48b598b06523 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
@@ -1942,15 +1942,19 @@ struct rtl8xxxu_vif {
};
struct rtl8xxxu_rx_urb {
- struct urb urb;
struct ieee80211_hw *hw;
struct list_head list;
+
+ /* Must be last as it ends in a flexible-array member. */
+ struct urb urb;
};
struct rtl8xxxu_tx_urb {
- struct urb urb;
struct ieee80211_hw *hw;
struct list_head list;
+
+ /* Must be last as it ends in a flexible-array member. */
+ struct urb urb;
};
struct rtl8xxxu_fileops {
--
2.43.0
Powered by blists - more mailing lists