1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/ath/wil6210
Gustavo A. R. Silva cbb0697e0d wifi: wil6210: wmi: Use __counted_by() in struct wmi_set_link_monitor_cmd and avoid -Wfamnae warning
Prepare for the coming implementation by GCC and Clang of the
__counted_by attribute. Flexible array members annotated with
__counted_by can have their accesses bounds-checked at run-time
via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE
(for strcpy/memcpy-family functions).

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

So, use the `DEFINE_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/ath/wil6210/wmi.c:4018:49: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

Link: https://github.com/KSPP/linux/issues/202
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/ZgSTCmdP+omePvWg@neat
2024-04-04 13:12:20 +03:00
..
boot_loader.h wil6210: add SPDX license identifiers 2019-10-31 10:16:10 +02:00
cfg80211.c wifi: wil6210: cfg80211: Use __counted_by() in struct wmi_start_scan_cmd and avoid some -Wfamnae warnings 2024-04-04 13:11:27 +03:00
debug.c wil6210: add SPDX license identifiers 2019-10-31 10:16:10 +02:00
debugfs.c wifi: wil6210: debugfs: use DEFINE_SHOW_ATTRIBUTE to simplify fw_capabilities/fw_version 2022-09-28 10:45:20 +03:00
ethtool.c ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
fw.c wil6210: add SPDX license identifiers 2019-10-31 10:16:10 +02:00
fw.h wifi: wil6210: fix sparse warnings 2024-03-25 12:50:42 +02:00
fw_inc.c wifi: wil6210: fix sparse warnings 2024-03-25 12:50:42 +02:00
interrupt.c wil6210: Fix wrong function name in comments 2021-06-15 17:01:25 +03:00
Kconfig wil6210: select CONFIG_CRC32 2021-01-05 15:50:36 -08:00
main.c wifi: move from strlcpy with unused retval to strscpy 2022-09-02 11:47:22 +03:00
Makefile ath: fix SPDX tags 2019-06-26 18:11:06 +03:00
netdev.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
p2p.c wil6210: add SPDX license identifiers 2019-10-31 10:16:10 +02:00
pcie_bus.c cfg80211: avoid holding the RTNL when calling the driver 2021-01-26 11:55:50 +01:00
pm.c wil6210: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() 2022-04-23 12:31:48 +03:00
pmc.c wil6210: pmc: Demote a few nonconformant kernel-doc function headers 2020-08-31 18:18:40 +03:00
pmc.h wil6210: add SPDX license identifiers 2019-10-31 10:16:10 +02:00
rx_reorder.c wil6210: add SPDX license identifiers 2019-10-31 10:16:10 +02:00
trace.c wil6210: add SPDX license identifiers 2019-10-31 10:16:10 +02:00
trace.h tracing/ath: Use the new __vstring() helper 2022-07-15 17:44:40 -04:00
txrx.c wifi: wil6210: fix fortify warnings 2023-07-27 19:12:49 +03:00
txrx.h wifi: wil6210: fix fortify warnings 2023-07-27 19:12:49 +03:00
txrx_edma.c wifi: wil6210: fix fortify warnings 2023-07-27 19:12:49 +03:00
txrx_edma.h wifi: wil6210: fix fortify warnings 2023-07-27 19:12:49 +03:00
wil6210.h wil6210: use NAPI_POLL_WEIGHT for napi budget 2022-05-02 17:00:11 +03:00
wil_crash_dump.c wil6210: take mem_lock for writing in crash dump collection 2019-12-19 18:15:56 +02:00
wil_platform.c wil6210: wil_platform: Demote kernel-doc header to standard comment block 2020-08-31 18:18:43 +03:00
wil_platform.h wil6210: add SPDX license identifiers 2019-10-31 10:16:10 +02:00
wmi.c wifi: wil6210: wmi: Use __counted_by() in struct wmi_set_link_monitor_cmd and avoid -Wfamnae warning 2024-04-04 13:12:20 +03:00
wmi.h wifi: wil6210: wmi: Use __counted_by() in struct wmi_set_link_monitor_cmd and avoid -Wfamnae warning 2024-04-04 13:12:20 +03:00