From add731385eed7b2c8298e3f97250e6057d7ca9cf Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Tue, 5 Dec 2023 13:00:17 -0800 Subject: wifi: ath11k: Fix ath11k_htc_record flexible record Transform the zero-length ath11k_htc_record::credit_report array into a proper flexible array. Since this is the only array in ath11k_htc_record, remove the unnecessary union. Signed-off-by: Jeff Johnson Reviewed-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231205-flexarray-htc_record-v2-1-fbb56d436951@quicinc.com --- drivers/net/wireless/ath/ath11k/htc.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/net/wireless/ath/ath11k') diff --git a/drivers/net/wireless/ath/ath11k/htc.h b/drivers/net/wireless/ath/ath11k/htc.h index d5864a35e75b..86f77eacaea7 100644 --- a/drivers/net/wireless/ath/ath11k/htc.h +++ b/drivers/net/wireless/ath/ath11k/htc.h @@ -151,9 +151,7 @@ struct ath11k_htc_credit_report { struct ath11k_htc_record { struct ath11k_htc_record_hdr hdr; - union { - struct ath11k_htc_credit_report credit_report[0]; - }; + struct ath11k_htc_credit_report credit_report[]; } __packed __aligned(4); enum ath11k_htc_svc_gid { -- cgit v1.2.3