From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
To: Jes Sorensen <Jes.Sorensen@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
linux-hardening@vger.kernel.org
Subject: [PATCH][next] wifi: rtl8xxxu: Avoid -Wflex-array-member-not-at-end warnings
Date: Wed, 19 Nov 2025 18:08:05 +0900 [thread overview]
Message-ID: <aR2I9Sere0W-4VZz@kspp> (raw)
-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@kernel.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
next reply other threads:[~2025-11-19 9:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 9:08 Gustavo A. R. Silva [this message]
2025-11-21 6:09 ` [PATCH][next] wifi: rtl8xxxu: Avoid -Wflex-array-member-not-at-end warnings Ping-Ke Shih
2025-11-21 10:06 ` Zenm Chen
2025-11-21 10:19 ` Gustavo A. R. Silva
2025-11-21 11:11 ` Zenm Chen
2025-11-23 20:29 ` Bitterblue Smith
2025-11-24 6:37 ` Ping-Ke Shih
2025-11-24 8:02 ` Zenm Chen
2025-11-26 3:26 ` Ping-Ke Shih
2025-12-06 21:53 ` Bitterblue Smith
2025-12-06 23:16 ` Michal Pecio
2025-12-06 23:55 ` Greg KH
2025-12-07 8:05 ` Michal Pecio
2025-12-08 0:05 ` Bitterblue Smith
2025-11-21 11:12 ` Ping-Ke Shih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aR2I9Sere0W-4VZz@kspp \
--to=gustavoars@kernel.org \
--cc=Jes.Sorensen@gmail.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).