diff mbox series

[next] wifi: ti: Avoid a hundred -Wflex-array-member-not-at-end warnings

Message ID ZgDcwIgxkhs6ZVdY@neat (mailing list archive)
State Mainlined
Commit f4b09b29f8b498e6c5f7cd582b5c0cbd37c1b90a
Headers show
Series [next] wifi: ti: Avoid a hundred -Wflex-array-member-not-at-end warnings | expand

Commit Message

Gustavo A. R. Silva March 25, 2024, 2:09 a.m. UTC
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
ready to enable it globally.

Remove unused flexible-array members in multiple structures, and fix
a hundred -Wflex-array-member-not-at-end warnings[1] in
drivers/wireless/ti/

Link: https://gist.github.com/GustavoARSilva/fbf63c114d01319bbd19baf95b4d704b [1]
Link: https://github.com/KSPP/linux/issues/202
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/net/wireless/ti/wl1251/cmd.h          | 2 --
 drivers/net/wireless/ti/wl1251/wl12xx_80211.h | 1 -
 drivers/net/wireless/ti/wlcore/cmd.h          | 2 --
 drivers/net/wireless/ti/wlcore/wl12xx_80211.h | 1 -
 4 files changed, 6 deletions(-)

Comments

Kalle Valo March 28, 2024, 1:07 p.m. UTC | #1
"Gustavo A. R. Silva" <gustavoars@kernel.org> wrote:

> -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
> ready to enable it globally.
> 
> Remove unused flexible-array members in multiple structures, and fix
> a hundred -Wflex-array-member-not-at-end warnings[1] in
> drivers/wireless/ti/
> 
> Link: https://gist.github.com/GustavoARSilva/fbf63c114d01319bbd19baf95b4d704b [1]
> Link: https://github.com/KSPP/linux/issues/202
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Patch applied to wireless-next.git, thanks.

f4b09b29f8b4 wifi: ti: Avoid a hundred -Wflex-array-member-not-at-end warnings
diff mbox series

Patch

diff --git a/drivers/net/wireless/ti/wl1251/cmd.h b/drivers/net/wireless/ti/wl1251/cmd.h
index e5874186f9d7..39159201b97e 100644
--- a/drivers/net/wireless/ti/wl1251/cmd.h
+++ b/drivers/net/wireless/ti/wl1251/cmd.h
@@ -89,8 +89,6 @@  enum wl1251_commands {
 struct wl1251_cmd_header {
 	u16 id;
 	u16 status;
-	/* payload */
-	u8 data[];
 } __packed;
 
 struct  wl1251_command {
diff --git a/drivers/net/wireless/ti/wl1251/wl12xx_80211.h b/drivers/net/wireless/ti/wl1251/wl12xx_80211.h
index 7e28fe435b43..3d5b0df5b231 100644
--- a/drivers/net/wireless/ti/wl1251/wl12xx_80211.h
+++ b/drivers/net/wireless/ti/wl1251/wl12xx_80211.h
@@ -65,7 +65,6 @@  struct ieee80211_header {
 	u8 sa[ETH_ALEN];
 	u8 bssid[ETH_ALEN];
 	__le16 seq_ctl;
-	u8 payload[];
 } __packed;
 
 struct wl12xx_ie_header {
diff --git a/drivers/net/wireless/ti/wlcore/cmd.h b/drivers/net/wireless/ti/wlcore/cmd.h
index f2609d5b6bf7..4c2f2608ef3b 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.h
+++ b/drivers/net/wireless/ti/wlcore/cmd.h
@@ -208,8 +208,6 @@  enum cmd_templ {
 struct wl1271_cmd_header {
 	__le16 id;
 	__le16 status;
-	/* payload */
-	u8 data[];
 } __packed;
 
 #define WL1271_CMD_MAX_PARAMS 572
diff --git a/drivers/net/wireless/ti/wlcore/wl12xx_80211.h b/drivers/net/wireless/ti/wlcore/wl12xx_80211.h
index 1dd7ecc11f86..602915c4da26 100644
--- a/drivers/net/wireless/ti/wlcore/wl12xx_80211.h
+++ b/drivers/net/wireless/ti/wlcore/wl12xx_80211.h
@@ -66,7 +66,6 @@  struct ieee80211_header {
 	u8 sa[ETH_ALEN];
 	u8 bssid[ETH_ALEN];
 	__le16 seq_ctl;
-	u8 payload[];
 } __packed;
 
 struct wl12xx_ie_header {