Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp562276rdb; Tue, 5 Dec 2023 13:00:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IEco8MlhAnoFdpAlnZliF5pksXAFvAK+FrOkyDFEAd+1nUivX33IcX5RJZTY6s4NvQ9Zmqt X-Received: by 2002:a05:600c:19cc:b0:40b:5e4a:407f with SMTP id u12-20020a05600c19cc00b0040b5e4a407fmr854378wmq.159.1701810037202; Tue, 05 Dec 2023 13:00:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701810037; cv=none; d=google.com; s=arc-20160816; b=lcNhxRdZg65svHSXUrdYNx7fuHuQ3bCxfJZykh47HMZ2Bgqxb7EqUzoHW2PwHnl8f+ 2Htefq55mWOZ3IZZU3wbMWpLhnicmso+zf4JYMwB86hfvYTDzamJignnnLQ7eEYPSb5a gAU1IvXpsViExh10kq+ipM5v8LSAlwEXsG9O0RMi/FComE4hRRPe9NG6HwpH94NLKzIw cIu/PHkelzl0nfagdP/WKBSPs3dxnLtZOBaqNI+FJwkcnOtE4jL4EHC3sUnnnELvFG05 lgoeK4rON29/hmYdUJb2+L0C3Nbx/O6tYvQ3GJk2TmhcgWIyb6YSZnO/xyn64uDW21G6 JhGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=PlydpWRjHtHic2XxvMv/KvRCxL0wDGS/TfYuHMvLVH8=; fh=s4nhT2C4mK/hvbu5uFMMvJf/iQz0ocsy+KUrmfUmlxQ=; b=SSdWmYSSmQhsZDKZK0yTpMRbqylxXn7zgKiPlNAO9/pUCiikEuB9DXRXhkN74gnxH7 1yVH83clBCc7uKhk5D8QCGznyriZ++aB6MNY5bKQyU1dzPIlovv4aPqsyVPdIH4TKbzJ foioGyc+06O11rBm6XTHFqlpfAWNdP0BvvbK7W5dyrdA6M8WkOZYjEwLrwqyrqr9xZtT DmDjxVz6QmHsAnFGS6StZloQwtr28MsVTaS9nCAoVb0RqVkGcyyQ6Nd43/NUBskFnouE KsjQkMuKqePjIR8ehX7XhyiAUXP5JcE0LJFTVDfDQ6RyUTrVHtsLNYGxT1YPUw/JTOuY 3uuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=VmL83gv5; spf=pass (google.com: domain of linux-wireless+bounces-439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-439-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u25-20020a1709060b1900b009ff21392283si5922717ejg.813.2023.12.05.13.00.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 13:00:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=VmL83gv5; spf=pass (google.com: domain of linux-wireless+bounces-439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-439-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EE8651F2124B for ; Tue, 5 Dec 2023 21:00:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1BE86A03D; Tue, 5 Dec 2023 21:00:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="VmL83gv5" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66B90188; Tue, 5 Dec 2023 13:00:29 -0800 (PST) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B5KCpa8027610; Tue, 5 Dec 2023 21:00:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : date : subject : mime-version : content-type : content-transfer-encoding : message-id : to : cc; s=qcppdkim1; bh=PlydpWRjHtHic2XxvMv/KvRCxL0wDGS/TfYuHMvLVH8=; b=VmL83gv5+Ea2Ms9hTUP4+lpmFijdLhl7kcMHqRi68oOHq38SgHdn1z0CUmXzVzg+fwmx I2ffILlns32I8SHWCh/TgVqqDp/gYRitTfWYJtuBzF8llo+MtgEyY2lMrMrdDLgGkbRN av32i9rmddVtEV0Q75gEgiTeztLMS6M0otnLXWAZTfoFRUIbiprZfIA9SABn3SvDuCZN meSeiDflbrG3STs/G+zui0LFATcPuLOqTUlT7R3prpypX3fidDCOqGQBiAd8KO2pkSwR aCcJWldD+F+UXsDlLugr1EWT4kBCvAQRFFw3o6JM8AZyhoif+frsnZxusrLBvvUoWlNv oA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3utapgr30x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Dec 2023 21:00:19 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3B5L0IQj017032 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 5 Dec 2023 21:00:18 GMT Received: from [169.254.0.1] (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 5 Dec 2023 13:00:17 -0800 From: Jeff Johnson Date: Tue, 5 Dec 2023 13:00:17 -0800 Subject: [PATCH v2] wifi: ath11k: Fix ath11k_htc_record flexible record Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20231205-flexarray-htc_record-v2-1-fbb56d436951@quicinc.com> X-B4-Tracking: v=1; b=H4sIAGCPb2UC/4WNyw6CMBBFf4V0bU1bSH2s/A9DTB8zMolSbZFAC P9uwZUbXZ6bnHMnliASJHYsJhahp0ShzaA2BXONaa/AyWdmSqhSSqk53mAwMZqRN527RHAhem6 g0ijKg68ssqw+IiANa/ZcZ24odSGO60svl/VPsJdccAVeCWtxDx5Pzxc5at3Whfvy8NHV7oeuL UgstVQa/Zdez/P8BloMeTD5AAAA To: Kalle Valo CC: "Gustavo A. R. Silva" , Kees Cook , , , , "Jeff Johnson" X-Mailer: b4 0.12.3 X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: jTLfMYYRSr1i-mXPq7trv5a3bVfsyhQu X-Proofpoint-GUID: jTLfMYYRSr1i-mXPq7trv5a3bVfsyhQu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-05_16,2023-12-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 impostorscore=0 mlxscore=0 phishscore=0 mlxlogscore=500 bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312050163 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 --- Changes in v2: - Original patches 1/4 2/4 3/4 already accepted - This is original patch 4/4, updated to incorporate Gustavo's review comment, removing the `union` and just do a direct transformation [0] -> [ ] - Link to v1: https://lore.kernel.org/r/20231127-flexarray-htc_record-v1-0-6be1f36126fd@quicinc.com --- drivers/net/wireless/ath/ath11k/htc.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 { --- base-commit: c8a5f34ad811743d1b3aeb5c54198eebd413bc6d change-id: 20231116-flexarray-htc_record-ae46f039d4bf