wifi: iwlwifi: mvm: Avoid -Wflex-array-member-not-at-end warning
authorGustavo A. R. Silva <gustavoars@kernel.org>
Thu, 27 Mar 2025 00:04:02 +0000 (18:04 -0600)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 23 Apr 2025 13:20:58 +0000 (15:20 +0200)
commit7438843df8cf7a484303caee7540a00f0ef972b2
tree1c686a2c20aa9aff50cac880d35e225156f7e3f9
parent17328a5b6a8ff21d318283700d8d33dc2b8ca652
wifi: iwlwifi: mvm: Avoid -Wflex-array-member-not-at-end warning

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

Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of
a flexible structure where the size of the flexible-array member
is known at compile-time, and refactor the rest of the code,
accordingly.

So, with these changes, fix the following warning:

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:6430:41: 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>
Acked-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/Z-SV8gb6MuZJmmhe@kspp
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c