public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] wireless: ti: Can we just remove this flexible array?
@ 2024-03-19 21:59 Gustavo A. R. Silva
  2024-03-19 22:54 ` Jeff Johnson
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo A. R. Silva @ 2024-03-19 21:59 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, LKML, linux-hardening

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.

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;


Thanks!
--
Gustavo

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-20 17:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-19 21:59 [RFC] wireless: ti: Can we just remove this flexible array? Gustavo A. R. Silva
2024-03-19 22:54 ` Jeff Johnson
2024-03-20  0:42   ` Gustavo A. R. Silva
2024-03-20  9:03     ` Johannes Berg
2024-03-20 17:10       ` Jeff Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox