Commit 7b4df59f authored by Jeff Johnson's avatar Jeff Johnson Committed by Kalle Valo

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: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20231127-flexarray-htc_record-v1-2-6be1f36126fd@quicinc.com
parent c7876faa
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment