summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath10k/htc.h
diff options
context:
space:
mode:
authorJeff Johnson <quic_jjohnson@quicinc.com>2023-11-27 19:14:48 +0300
committerKalle Valo <quic_kvalo@quicinc.com>2023-11-30 20:02:23 +0300
commit7b4df59fced034c88c012231361f94662d2487dc (patch)
treeeea291778f6f51775fcfc62890475d36a196dd5b /drivers/net/wireless/ath/ath10k/htc.h
parentc7876faa91ab01b314b81ea8e5a0ccdeb186f483 (diff)
downloadlinux-7b4df59fced034c88c012231361f94662d2487dc.tar.xz
wifi: ath10k: Use DECLARE_FLEX_ARRAY() for ath10k_htc_record
Transform the zero-length arrays in ath10k_htc_record into proper flexible arrays via the DECLARE_FLEX_ARRAY() macro. This helps with ongoing efforts to globally enable -Warray-bounds. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20231127-flexarray-htc_record-v1-2-6be1f36126fd@quicinc.com
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/htc.h')
-rw-r--r--drivers/net/wireless/ath/ath10k/htc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h
index feb7af8f373a..7ff665020015 100644
--- a/drivers/net/wireless/ath/ath10k/htc.h
+++ b/drivers/net/wireless/ath/ath10k/htc.h
@@ -246,9 +246,9 @@ struct ath10k_htc_lookahead_bundle {
struct ath10k_htc_record {
struct ath10k_ath10k_htc_record_hdr hdr;
union {
- struct ath10k_htc_credit_report credit_report[0];
- struct ath10k_htc_lookahead_report lookahead_report[0];
- struct ath10k_htc_lookahead_bundle lookahead_bundle[0];
+ DECLARE_FLEX_ARRAY(struct ath10k_htc_credit_report, credit_report);
+ DECLARE_FLEX_ARRAY(struct ath10k_htc_lookahead_report, lookahead_report);
+ DECLARE_FLEX_ARRAY(struct ath10k_htc_lookahead_bundle, lookahead_bundle);
};
} __packed __aligned(4);