Skip to content

Commit 7b4df59

Browse files
Jeff Johnsonkvalo
authored andcommitted
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 <[email protected]> Reviewed-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c7876fa commit 7b4df59

File tree

1 file changed

+3
-3
lines changed
  • drivers/net/wireless/ath/ath10k

1 file changed

+3
-3
lines changed

drivers/net/wireless/ath/ath10k/htc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ struct ath10k_htc_lookahead_bundle {
246246
struct ath10k_htc_record {
247247
struct ath10k_ath10k_htc_record_hdr hdr;
248248
union {
249-
struct ath10k_htc_credit_report credit_report[0];
250-
struct ath10k_htc_lookahead_report lookahead_report[0];
251-
struct ath10k_htc_lookahead_bundle lookahead_bundle[0];
249+
DECLARE_FLEX_ARRAY(struct ath10k_htc_credit_report, credit_report);
250+
DECLARE_FLEX_ARRAY(struct ath10k_htc_lookahead_report, lookahead_report);
251+
DECLARE_FLEX_ARRAY(struct ath10k_htc_lookahead_bundle, lookahead_bundle);
252252
};
253253
} __packed __aligned(4);
254254

0 commit comments

Comments
 (0)