ath10k: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper
Subsystems (3)
PATCH 1/1 ath10k: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new DECLARE_FLEX_ARRAY() helper macro.
This helper allows for flexible-array members in unions.
--- drivers/net/wireless/ath/ath10k/htt.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/htt.h +4 -2
@@ -1108,8 +1108,10 @@ struct htt_rx_in_ord_ind {u8 reserved;__le16 msdu_count;union { -struct htt_rx_in_ord_msdu_desc msdu_descs32[0 ]; -struct htt_rx_in_ord_msdu_desc_ext msdu_descs64[0 ]; + DECLARE_FLEX_ARRAY(struct htt_rx_in_ord_msdu_desc, + msdu_descs32); + DECLARE_FLEX_ARRAY(struct htt_rx_in_ord_msdu_desc_ext, + msdu_descs64); } __packed; } __packed;
Signature · 1 line
2.34.1
Quoted 11 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new
DECLARE_FLEX_ARRAY()helper macro.This helper allows for flexible-array members in unions.
Signature · 1 line
Kees Cook
Quoted 5 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new
DECLARE_FLEX_ARRAY()helper macro.
Quoted 8 lines
This helper allows for flexible-array members in unions.
Patch applied to ath-next branch of ath.git, thanks.
00d942e779c2 wifi: ath10k: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper
Signature · 9 lines
https://patchwork.kernel.org/project/linux-wireless/patch/YzIcoloIQBDqGlgc@work/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k