]> git.ipfire.org Git - thirdparty/linux.git/commit
carl9170: Avoid -Wflex-array-member-not-at-end warning
authorGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 19 Nov 2025 07:33:26 +0000 (16:33 +0900)
committerKees Cook <kees@kernel.org>
Sat, 17 Jan 2026 19:00:37 +0000 (11:00 -0800)
commitcd8da637106d6a1924c0d6dd05e8ee932ef234b5
tree596d5284f4329e28234489461c1b1a356a590857
parentfac4ab5cd0ad8d3abce6d2b519c9f0d26c8f2abc
carl9170: 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.

Move the conflicting declaration (which happens to be in a union, so
we're moving the entire union) to the end of the corresponding
structure. Notice that `struct carl9170_rsp` is a flexible structure,
this is a structure that contains a flexible-array member.

With these changes fix the following warning:

drivers/net/wireless/ath/carl9170/carl9170.h:382:9: 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: Christian Lamparter <chunkeey@gmail.com>
Link: https://patch.msgid.link/aR1yxjmzb2DM2-Uq@kspp
Signed-off-by: Kees Cook <kees@kernel.org>
drivers/net/wireless/ath/carl9170/carl9170.h