linux/drivers/net/wireless/ath/ath9k
Arnd Bergmann 61752ac69b wifi: ath9k: work around memset overflow warning
gcc-9 and some other older versions produce a false-positive warning
for zeroing two fields

In file included from include/linux/string.h:369,
                 from drivers/net/wireless/ath/ath9k/main.c:18:
In function 'fortify_memset_chk',
    inlined from 'ath9k_ps_wakeup' at drivers/net/wireless/ath/ath9k/main.c:140:3:
include/linux/fortify-string.h:462:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  462 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Using a struct_group seems to reliably avoid the warning and
not make the code much uglier. The combined memset() should even
save a couple of cpu cycles.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240328135509.3755090-3-arnd@kernel.org
2024-04-04 13:09:45 +03:00
..
ahb.c wifi: ath9k: Convert to platform remove callback returning void 2023-12-18 20:46:11 +02:00
ani.c
ani.h
antenna.c wifi: ath9k: fix LNA selection in ath_ant_try_scan() 2023-12-18 20:46:30 +02:00
ar953x_initvals.h
ar955x_1p0_initvals.h
ar956x_initvals.h
ar5008_initvals.h
ar5008_phy.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9001_initvals.h
ar9002_calib.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9002_hw.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9002_initvals.h
ar9002_mac.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9002_phy.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9002_phy.h
ar9003_2p2_initvals.h
ar9003_aic.c
ar9003_aic.h
ar9003_buffalo_initvals.h
ar9003_calib.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9003_eeprom.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9003_eeprom.h wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9003_hw.c wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation 2023-04-28 19:51:31 +03:00
ar9003_mac.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9003_mac.h
ar9003_mci.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9003_mci.h
ar9003_paprd.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9003_phy.c wifi: ath9k: use u32 for txgain indexes 2023-09-20 16:16:12 +03:00
ar9003_phy.h wifi: ath9k: delete some unused/duplicate macros 2023-12-18 20:44:58 +02:00
ar9003_rtt.c
ar9003_rtt.h
ar9003_wow.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
ar9330_1p1_initvals.h
ar9330_1p2_initvals.h
ar9340_initvals.h
ar9462_2p0_initvals.h
ar9462_2p1_initvals.h
ar9485_initvals.h
ar9565_1p0_initvals.h
ar9565_1p1_initvals.h
ar9580_1p0_initvals.h
ath9k.h wifi: ath9k: fix ath9k_use_msi declaration 2024-03-25 12:51:37 +02:00
ath9k_pci_owl_loader.c wifi: ath9k: Remove unnecessary (void*) conversions 2023-11-29 13:28:05 +02:00
beacon.c wifi: mac80211: check beacon countdown is complete on per link basis 2024-02-21 15:19:03 +01:00
btcoex.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
btcoex.h
calib.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
calib.h
channel.c wifi: mac80211: extend ieee80211_nullfunc_get() for MLO 2022-09-06 10:14:24 +02:00
common-beacon.c
common-beacon.h
common-debug.c
common-debug.h
common-init.c wifi: ath9k: Remove unnecessary (void*) conversions 2023-11-29 13:28:05 +02:00
common-init.h
common-spectral.c wifi: ath9k: Remove unnecessary (void*) conversions 2023-11-29 13:28:05 +02:00
common-spectral.h
common.c
common.h wifi: ath9k: Remove unused declarations 2023-08-22 16:39:23 +03:00
debug.c wifi: ath9k: Remove unnecessary (void*) conversions 2023-11-29 13:28:05 +02:00
debug.h
debug_sta.c
dfs.c
dfs.h
dfs_debug.c wifi: ath9k: consistently use kstrtoX_from_user() functions 2023-08-22 16:37:53 +03:00
dfs_debug.h
dynack.c
dynack.h
eeprom.c
eeprom.h wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
eeprom_4k.c wifi: ath9k: eeprom: fix sparse endian warnings 2024-03-25 12:51:37 +02:00
eeprom_9287.c wifi: ath9k: eeprom: fix sparse endian warnings 2024-03-25 12:51:37 +02:00
eeprom_def.c wifi: ath9k: eeprom: fix sparse endian warnings 2024-03-25 12:51:37 +02:00
gpio.c
hif_usb.c wifi: ath9k: Remove unnecessary (void*) conversions 2023-11-29 13:28:05 +02:00
hif_usb.h wifi: ath9k_htc: fix format-truncation warning 2023-10-23 20:24:40 +03:00
htc.h wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete 2024-02-02 13:39:58 +02:00
htc_drv_beacon.c wifi: mac80211: check beacon countdown is complete on per link basis 2024-02-21 15:19:03 +01:00
htc_drv_debug.c wifi: ath9k: Remove unnecessary (void*) conversions 2023-11-29 13:28:05 +02:00
htc_drv_gpio.c
htc_drv_init.c wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete 2024-02-02 13:39:58 +02:00
htc_drv_main.c wifi: mac80211: simplify non-chanctx drivers 2024-02-08 12:58:32 +01:00
htc_drv_txrx.c wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete 2024-02-02 13:39:58 +02:00
htc_hst.c wifi: ath9k: Remove unnecessary (void*) conversions 2023-11-29 13:28:05 +02:00
htc_hst.h
hw-ops.h
hw.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
hw.h wifi: ath9k: fix repeated to words in a comment 2022-09-22 10:19:51 +03:00
init.c wifi: ath9k: Remove unnecessary (void*) conversions 2023-11-29 13:28:05 +02:00
Kconfig wifi: mac80211: use wiphy locked debugfs helpers for agg_status 2023-11-27 11:25:01 +01:00
link.c wifi: ath9k: Remove unnecessary (void*) conversions 2023-11-29 13:28:05 +02:00
mac.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
mac.h wifi: ath9k: fix fortify warnings 2023-07-25 17:28:03 +03:00
main.c wifi: ath9k: work around memset overflow warning 2024-04-04 13:09:45 +03:00
Makefile wifi: ath9k: Remove -Warray-bounds exception 2022-10-11 07:39:11 +03:00
mci.c wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels() 2023-04-19 17:24:47 +03:00
mci.h
pci.c wifi: ath9k: fix ath9k_use_msi declaration 2024-03-25 12:51:37 +02:00
phy.h
recv.c
reg.h wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
reg_aic.h wifi: ath9k: delete some unused/duplicate macros 2023-12-18 20:44:58 +02:00
reg_mci.h
reg_wow.h
rng.c wifi: ath9k: remove most hidden macro dependencies on ah 2022-12-22 19:13:39 +02:00
tx99.c wifi: ath9k: consistently use kstrtoX_from_user() functions 2023-08-22 16:37:53 +03:00
wmi.c wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete 2024-02-02 13:39:58 +02:00
wmi.h
wow.c
xmit.c wifi: ath9k: ath9k_set_moredata(): fix sparse warnings 2024-03-25 12:51:37 +02:00