1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/ath/carl9170
Gustavo A. R. Silva 1be3640cbb wifi: carl9170: Replace fake flex-array with flexible-array member
Zero-length arrays as fake flexible arrays are deprecated and we are
moving towards adopting C99 flexible-array members instead.

Address the following warnings found with GCC-13 and
-fstrict-flex-arrays=3 enabled:
drivers/net/wireless/ath/carl9170/tx.c:702:61: warning: array subscript i is outside array bounds of ‘const struct _carl9170_tx_status[0]’ [-Warray-bounds=]
drivers/net/wireless/ath/carl9170/tx.c:701:65: warning: array subscript i is outside array bounds of ‘const struct _carl9170_tx_status[0]’ [-Warray-bounds=]

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
routines on memcpy() and help us make progress towards globally
enabling -fstrict-flex-arrays=3 [1].

Link: https://github.com/KSPP/linux/issues/21
Link: https://github.com/KSPP/linux/issues/267
Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1]
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: Christian Lamparter <chunkeey@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/ZBSl2M+aGIO1fnuG@work
2023-03-24 16:54:01 +02:00
..
carl9170.h carl9170: devres-ing hwrng_register usage 2022-03-10 17:53:38 +02:00
cmd.c wifi: carl9170: Fix multiple -Warray-bounds warnings 2023-03-24 16:53:23 +02:00
cmd.h
debug.c carl9170: remove trailing semicolon in macro definition 2020-12-08 09:45:36 +02:00
debug.h
eeprom.h
fw.c wifi: move from strlcpy with unused retval to strscpy 2022-09-02 11:47:22 +03:00
fwcmd.h wifi: carl9170: Replace fake flex-array with flexible-array member 2023-03-24 16:54:01 +02:00
fwdesc.h carl9170: Replace zero-length arrays with flexible-array members 2022-02-24 11:03:42 +02:00
hw.h carl9170: Replace zero-length array with flexible-array 2020-05-12 10:31:49 +03:00
Kconfig wireless: carl9170: fix LEDS build errors & warnings 2021-06-12 13:37:46 +03:00
led.c mac80211: make LED trigger names const 2015-05-05 14:21:55 +02:00
mac.c carl9170: remove WDS code 2020-11-11 08:39:13 +01:00
main.c wifi: mac80211: add wake_tx_queue callback to drivers 2022-10-10 11:00:03 +02:00
Makefile wifi: carl9170: Remove -Warray-bounds exception 2022-10-12 09:36:38 +03:00
phy.c cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
phy.h
rx.c carl9170: Use fallthrough pseudo-keyword 2020-08-27 13:20:26 +03:00
tx.c wifi: mac80211: return a beacon for a specific link 2022-06-20 12:57:08 +02:00
usb.c carl9170: convert tasklets to use new tasklet_setup() API 2020-08-27 13:21:34 +03:00
version.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wlan.h carl9170: Replace zero-length array with DECLARE_FLEX_ARRAY() helper 2022-09-30 09:31:32 +03:00