Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3190817rdh; Mon, 27 Nov 2023 08:15:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHilB29DUUv8rhftbf7dPKYFRts2C2Wd05y7lMGy7MtPRrZkI2V9DoLES1DQyo6fcdGSexJ X-Received: by 2002:aca:1701:0:b0:3b2:ee69:800b with SMTP id j1-20020aca1701000000b003b2ee69800bmr13209017oii.55.1701101730597; Mon, 27 Nov 2023 08:15:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701101730; cv=none; d=google.com; s=arc-20160816; b=gGcJIgTe+PoLmDVC9i+qzjyn2SL39HS8Dm2Vk1zSscWTMkRR0hLoN/GRXM4WBTBhHW QzwV3fckRzqoyZ+3zJnWl6W47vmruIpnOQqemL+m6Z/uflfDRTUnB/76S8SxGEQH5hhU OOsBN9bvfOVaZcgewDw+S+K0lHHSePDgOROC5308KtZtECQdT6tDWmuHJsSvgMeu5EFq L4+Oui1HWCqV75p1cqCflgLMQzZMdhIT5ceAWDjebu1etBp2X7bIlFnT6b8t+71dHYVi wRXwC6w9aE/MRcl89eEY0XP5OKNBsXtb+80V/AK9JqRVwL6NNhgWJRkVkmE8MWVMS+Io 6MuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=AO8cGpLBaeunKrPjmlXZd/sscUATqYVwofXtEfGFPQk=; fh=ROkfxFviO4xfpoZ1YvvGWqlXLzI5SonC0uy/4A023gg=; b=l4NC6tP2SXavq4z2SmQiFMF6mxdXhN1e0udNNPQQigKyXEwKZDOktAi1PwDeFyDT64 JCdJhwIUIGDbH3p7fizMs3kvLn2mw8MvIejaHrDNaAt8JBWektxdZVqUJId4f2deK4la A1VCpREvEYjGycaS4GqSOZVioKlmDVKmpArwIY+uCvDnYAcAQ4wFLVhMHVCJynJTtbRa 9Fh39TV/ixBY+0RV6Jox7UdzGPs/g0+e/Ncbvf7aP9R0VJ/wmv/JxrnzILCI7Y0Y+iFY m3EVnuXrqq113OHHzLdNpBqBQT+wjRf2LO6rDssZ/CBv9/G46XFyHP2gE8asz6N/fUXs O9Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dFzAnkUE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id bj9-20020a056808198900b003a35fb0440dsi4240480oib.251.2023.11.27.08.15.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:15:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dFzAnkUE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id AC426802012A; Mon, 27 Nov 2023 08:15:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234506AbjK0QPM (ORCPT + 99 others); Mon, 27 Nov 2023 11:15:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234465AbjK0QPG (ORCPT ); Mon, 27 Nov 2023 11:15:06 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7172D5A; Mon, 27 Nov 2023 08:15:05 -0800 (PST) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3ARD0jji021363; Mon, 27 Nov 2023 16:14:58 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 : references : in-reply-to : to : cc; s=qcppdkim1; bh=AO8cGpLBaeunKrPjmlXZd/sscUATqYVwofXtEfGFPQk=; b=dFzAnkUE5PYAAAcJ/hb37CkI2Uy1VDsFtmS4n33luSz3gB4z2CF16bbOjbccaUrDHQ6x XC/SIEaK+Vrap59t/UhpEfCDiWi+B5bQFTuqLbRRygB5gSG96r3d2gDr6zQUTxydi6Ma i2+aWq1m+xdKkVhgEqvnzbkUYeb4ZqgVfVIAk3biveES7Uax2Brz3Xg07AYYHqUafV7w 0ILorvwoxfX+mWIdbweGaWqSr1S2zXPxBfpY2+MmTTBiwj5fx/I1wV/7AJSNVv+NYK6l 3Xj5s1uqMrcvvDh48ZB9vkeckW7t/g9EDMJ7Llk+GKe/lxLFJhyvOOULGoEaTE14if4S Kg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3umqxh148a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Nov 2023 16:14:50 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3ARGEn6E010139 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Nov 2023 16:14:49 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; Mon, 27 Nov 2023 08:14:49 -0800 From: Jeff Johnson Date: Mon, 27 Nov 2023 08:14:48 -0800 Subject: [PATCH 2/4] wifi: ath10k: Use DECLARE_FLEX_ARRAY() for ath10k_htc_record MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20231127-flexarray-htc_record-v1-2-6be1f36126fd@quicinc.com> References: <20231127-flexarray-htc_record-v1-0-6be1f36126fd@quicinc.com> In-Reply-To: <20231127-flexarray-htc_record-v1-0-6be1f36126fd@quicinc.com> To: Kalle Valo CC: "Gustavo A. R. Silva" , Kees Cook , , , , , Jeff Johnson X-Mailer: b4 0.12.3 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) 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-GUID: N3tgrD8x6g5r96BxFZlFOe_Bwz9pEJco X-Proofpoint-ORIG-GUID: N3tgrD8x6g5r96BxFZlFOe_Bwz9pEJco X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-27_14,2023-11-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 mlxlogscore=453 phishscore=0 spamscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311270112 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 27 Nov 2023 08:15:27 -0800 (PST) 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 --- drivers/net/wireless/ath/ath10k/htc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h index 9cbb901d35e5..c6c392f8630c 100644 --- a/drivers/net/wireless/ath/ath10k/htc.h +++ b/drivers/net/wireless/ath/ath10k/htc.h @@ -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); -- 2.42.0