Skip to contentSkip to conversation

mei: Avoid a bunch of -Wflex-array-member-not-at-end warnings

PATCH New Gustavo A. R. Silva 1 participant 1 message Mar 25, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mei: Avoid a bunch of -Wflex-array-member-not-at-end warnings

-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally.

After commit 40292383640a ("mei: revamp mei extension header structure layout.") it seems that flexible-array member data in struct mei_ext_hdr is no longer needed. So, remove it and, with that, fix 45 of the following -Wflex-array-member-not-at-end warnings[1] in drivers/misc/mei/:

drivers/misc/mei/hw.h:280:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

---
 drivers/misc/mei/hw.h | 2 --
 1 file changed, 2 deletions(-)
drivers/misc/mei/hw.h +0 -2
index eb800a07a84b..2e9cf6f4efb6 100644
@@ -247,12 +247,10 @@ enum mei_ext_hdr_type {
  * struct mei_ext_hdr - extend header descriptor (TLV)
  * @type: enum mei_ext_hdr_type
  * @length: length excluding descriptor
- * @data: the extended header payload
  */
 struct mei_ext_hdr {
 	u8 type;
 	u8 length;
-	u8 data[];
 } __packed;
 
 /**
Signature · 1 line
2.34.1