wireless: ti: Can we just remove this flexible array?
RFC 1/1 wireless: ti: Can we just remove this flexible array?
Hi!
struct wl1271_cmd_header is currently embedded in multiple other structs, and it's causing many -Wflex-array-member-not-at-end warnings.
Has this flexible-array member been used in the past or is it intended for future use?
Otherwise, I think we could just remove it.
drivers/net/wireless/ti/wlcore/cmd.h +0 -2
@@ -208,8 +208,6 @@ enum cmd_templ {struct wl1271_cmd_header {__le16 id;__le16 status; -/* payload */ -u8 data[]; } __packed;
Thanks!
--
Gustavo
Quoted 15 lines · Gustavo A. R. Silva
Hi!
struct wl1271_cmd_headeris currently embedded in multiple other structs, and it's causing many-Wflex-array-member-not-at-endwarnings.Has this flexible-array member been used in the past or is it intended for future use?
Otherwise, I think we could just remove it.
drivers/net/wireless/ti/wlcore/cmd.h +0
-0
drivers/net/wireless/ti/wlcore/cmd.h enum cmd_templ { · line 211
Quoted 6 lines
drivers/net/wireless/ti/wlcore/cmd.h +0
-2@@ -208,8 +208,6 @@ enum cmd_templ {struct wl1271_cmd_header {__le16 id;__le16 status; -/* payload */ -u8 data[]; } __packed;
I'd think you should just remove it
Quoted 11 lines · Jeff Johnson
Quoted 10 lines · Gustavo A. R. Silva
Hi!
struct wl1271_cmd_headeris currently embedded in multiple other structs, and it's causing many-Wflex-array-member-not-at-endwarnings.Has this flexible-array member been used in the past or is it intended for future use?
Otherwise, I think we could just remove it.
Quoted 14 lines
drivers/net/wireless/ti/wlcore/cmd.h enum cmd_templ { · line 211
Quoted 11 lines
drivers/net/wireless/ti/wlcore/cmd.h +0
-2@@ -208,8 +208,6 @@ enum cmd_templ {struct wl1271_cmd_header {__le16 id;__le16 status; -/* payload */ -u8 data[]; } __packed;I'd think you should just remove it
Yep, I think I'm actually going to remove a few more:
drivers/net/wireless/ti/wl1251/cmd.h +0 -2
@@ -89,8 +89,6 @@ enum wl1251_commands {struct wl1251_cmd_header {u16 id;u16 status; -/* payload */ -u8 data[]; } __packed;struct wl1251_command {
drivers/net/wireless/ti/wl1251/wl12xx_80211.h +0 -1
@@ -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 {
drivers/net/wireless/ti/wlcore/cmd.h +0 -2
@@ -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
drivers/net/wireless/ti/wlcore/wl12xx_80211.h +0 -1
@@ -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 {
--
Gustavo
Quoted 5 lines · Gustavo A. R. Silva
Quoted 5 lines
drivers/net/wireless/ti/wl1251/cmd.h enum wl1251_commands { · line 92
Quoted 4 lines
drivers/net/wireless/ti/wl1251/cmd.h +0
-2-/* payload */ -u8 data[]; } __packed;
Why not keep (or even add in the cases where it's not) the comment though?
johannes
Quoted 9 lines · Johannes Berg
Quoted 5 lines · Gustavo A. R. Silva
Quoted 5 lines
drivers/net/wireless/ti/wl1251/cmd.h enum wl1251_commands { · line 92
Quoted 4 lines
drivers/net/wireless/ti/wl1251/cmd.h +0
-2-/* payload */ -u8 data[]; } __packed;Why not keep (or even add in the cases where it's not) the comment though?
For something called <foo>_header isn't it implicit that something will probably follow?