Message ID | 20231213-wmi_host_mem_chunks_flexarray-v1-3-92922d92fa2c@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp7925554dys; Wed, 13 Dec 2023 09:07:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHv34kshtq7X1gEi6SG3MD3nWi5bEfsChGqDgdW0Gj9Fjj7Mqpf2Wmh3TD96BgRK75L2qFx X-Received: by 2002:a05:6358:5e11:b0:16e:508e:1706 with SMTP id q17-20020a0563585e1100b0016e508e1706mr12135169rwn.25.1702487265341; Wed, 13 Dec 2023 09:07:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702487265; cv=none; d=google.com; s=arc-20160816; b=PvwTd5ZbIuif4QGocZqXjVGR0BsracKtMm+wldcBL4Ma+KDxLwy6Ke+QnUJEHmzFzT u3b/q+d5xc73k8Hrn+28vMTpTXE/Mf9ZRlvjTd1EYKTmIlbhn3zDigdaRaW+Kak6logC AMHwAyzVHRiKaqdRpjyQAII6Dm/qgIG7SZhmVbQPHEvbi87t/yu3mYh4lobpzVeaZ3r7 CziEvoA/hUYht5dcqAoCIRwdVQe5+XRIo2gWaHnGjKES+X2NXJ31QPrOWolg43Jmkchc aeUqLYhXONefQqktec3++evJ0mPVrSp2eOMzi8Y+7zCpAz2QWnzyz23nJiEn/wKZuZG5 u6xw== 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=7OZamUWw3Cw/vs3z6jyDIl3qQ0eaP3fRUmZ151FveOY=; fh=f4dIorfYpvrEtypEqDl0xAr0U3fgNW6JnHp2tNMuoOs=; b=t/VxPqdUhtCB3LcoFoHIPAWmFmF6CgTEGm2du+im+BSgM2NCUCT0l97LN+y6Lu3IsT J7+D0qDxcjNgkYbwkDdCcutZLE7gZnOjM1p4MkQBPFIiIFW8TbkrMkoJ4Unm4lfmzwfG 6z4WRtNV3/TjQwYcUdc8QqZ7RXumv+dVRskdwJTBOYKJ7hrdfhwyWl4kxthiO0LfnZ4A FWbKWynRQS0L5NLiGE5Cm6q6Oloh0lBtHk9nj16Aqr9t0Ab/2UdhzADabpxqPwC0Ruxe GLvGWGjOqxv4SIMtulU53AZe8KQeV3eL1w6WdaN0z+NXt63iUpbWclJzAwKWtUv0U79R yCyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="H/BcYvcP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id s7-20020a63f047000000b005c216b7d4easi9639036pgj.473.2023.12.13.09.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 09:07:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="H/BcYvcP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 1F27C81B17CC; Wed, 13 Dec 2023 09:07:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377526AbjLMRHR (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Wed, 13 Dec 2023 12:07:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233730AbjLMRHO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Dec 2023 12:07:14 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C01C7EA; Wed, 13 Dec 2023 09:07:20 -0800 (PST) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BDCvukr012797; Wed, 13 Dec 2023 17:06:42 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=7OZamUWw3Cw/vs3z6jyDIl3qQ0eaP3fRUmZ151FveOY =; b=H/BcYvcPeDNr/Ymv2ybIoK+avFIj/b4dM6uSIZenbQiLRBiusM8vM31Is5H E+RgI9EZgWZcMRr4wok6RkrufyoyA91XVWtrlmZOVE1HTyUgIeECKu7orRqwK/XQ TR/w+jMpELybdRAtmg1NYYeQf+Oib3dnraqkfOZ7ASau1BQAfYE+rNiVDK+c2h7D fomnx6/IsvkPo3eDSWmkzuNMs83zN8SKSa2Tw24+RTzYIO71dl4zrlY1kHI0fSHm 7xynOKRamByNPgoUDRsxoFJmxglnRBPsFy1J37a/RjP9sFMa0zzdPRGYg319tmZx 5paf4tH2GCQfgIhM6USkgDTgjpQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uy9gd15qd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 17:06:42 +0000 (GMT) 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 3BDH6fVl008894 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 17:06:41 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; Wed, 13 Dec 2023 09:06:41 -0800 From: Jeff Johnson <quic_jjohnson@quicinc.com> Date: Wed, 13 Dec 2023 09:06:41 -0800 Subject: [PATCH 3/6] wifi: ath10k: remove struct wmi_pdev_chanlist_update_event MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20231213-wmi_host_mem_chunks_flexarray-v1-3-92922d92fa2c@quicinc.com> References: <20231213-wmi_host_mem_chunks_flexarray-v1-0-92922d92fa2c@quicinc.com> In-Reply-To: <20231213-wmi_host_mem_chunks_flexarray-v1-0-92922d92fa2c@quicinc.com> To: Kalle Valo <kvalo@kernel.org>, Jeff Johnson <quic_jjohnson@quicinc.com> CC: Kees Cook <keescook@chromium.org>, "Gustavo A. R. Silva" <gustavo@embeddedor.com>, <ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>, <linux-kernel@vger.kernel.org> 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-ORIG-GUID: OvSn-JBmwLd-beZCsjU9vyiQNPb04lbe X-Proofpoint-GUID: OvSn-JBmwLd-beZCsjU9vyiQNPb04lbe 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-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 clxscore=1015 phishscore=0 adultscore=0 mlxlogscore=806 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312130122 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 pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Dec 2023 09:07:40 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785187286744333949 X-GMAIL-MSGID: 1785187286744333949 |
Series |
wifi: ath10k: use flexible arrays
|
|
Commit Message
Jeff Johnson
Dec. 13, 2023, 5:06 p.m. UTC
Currently struct wmi_pdev_chanlist_update_event defines:
struct wmi_channel channel_list[1];
Per the guidance in [1] this should be a flexible array. However
during conversion it was discovered that this struct is not used, so
just remove the entire struct.
No functional changes, compile tested only.
[1] https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
---
drivers/net/wireless/ath/ath10k/wmi.h | 7 -------
1 file changed, 7 deletions(-)
Comments
On Wed, Dec 13, 2023 at 09:06:41AM -0800, Jeff Johnson wrote: > Currently struct wmi_pdev_chanlist_update_event defines: > struct wmi_channel channel_list[1]; > > Per the guidance in [1] this should be a flexible array. However > during conversion it was discovered that this struct is not used, so > just remove the entire struct. > > No functional changes, compile tested only. > > [1] https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays > > Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Removal of unused structs is good. :) Reviewed-by: Kees Cook <keescook@chromium.org>
On 12/13/23 11:06, Jeff Johnson wrote: > Currently struct wmi_pdev_chanlist_update_event defines: > struct wmi_channel channel_list[1]; > > Per the guidance in [1] this should be a flexible array. However > during conversion it was discovered that this struct is not used, so > just remove the entire struct. Less code is always great. :) > > No functional changes, compile tested only. > > [1] https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays > > Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Thanks! -- Gustavo > --- > drivers/net/wireless/ath/ath10k/wmi.h | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h > index 52a409ff94e7..37a7d421bd86 100644 > --- a/drivers/net/wireless/ath/ath10k/wmi.h > +++ b/drivers/net/wireless/ath/ath10k/wmi.h > @@ -4256,13 +4256,6 @@ struct wmi_peer_sta_ps_state_chg_event { > __le32 peer_ps_state; > } __packed; > > -struct wmi_pdev_chanlist_update_event { > - /* number of channels */ > - __le32 num_chan; > - /* array of channels */ > - struct wmi_channel channel_list[1]; > -} __packed; > - > #define WMI_MAX_DEBUG_MESG (sizeof(u32) * 32) > > struct wmi_debug_mesg_event { >
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 52a409ff94e7..37a7d421bd86 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -4256,13 +4256,6 @@ struct wmi_peer_sta_ps_state_chg_event { __le32 peer_ps_state; } __packed; -struct wmi_pdev_chanlist_update_event { - /* number of channels */ - __le32 num_chan; - /* array of channels */ - struct wmi_channel channel_list[1]; -} __packed; - #define WMI_MAX_DEBUG_MESG (sizeof(u32) * 32) struct wmi_debug_mesg_event {