Message ID | 20231213-wmi_host_mem_chunks_flexarray-v1-4-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 c4csp7925460dys; Wed, 13 Dec 2023 09:07:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvfXp+9u6GkdT5PdYxyB4fLvRtlaiT6bvNrPDCYbuBIJAXnOVYhiVolkRsSnSMqTzdHTi5 X-Received: by 2002:a05:6a21:7882:b0:190:9280:7268 with SMTP id bf2-20020a056a21788200b0019092807268mr8806315pzc.57.1702487258074; Wed, 13 Dec 2023 09:07:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702487258; cv=none; d=google.com; s=arc-20160816; b=E6U4hQL/Xt25dx9wdCX6kqPuiyBjzbbHX30YMmsa9V8vQp20BxmZF53oOvHzy+RPYi 1z1KvoCJR/H6uOceTiUVonPagWfop+A7+e1qcNawpmhceYy2jmS/zGSzPZdiSJLur0nX epQJNm6bFoELEsSEcrW21pAKzXFqGYhDG5wosaweuu83nLYfGncW7y79LVgsS+4qYq8f MdPdRuFF8Ov1n/z7yp5r/SdkQIYxkvKnKZdj079Io079Zli1HHv08Jni30+LegwWkTfm ADhBpvnH6+9nWudSd2llZFQae91E79BoQHCLFgrb3eK+Pn1Wemp7Mtn18DrfSbAvVh6o cOag== 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=1AcIyhIoIAYJEtYsTXVyARk5rQvUQbVh1Ib4zg2TLCE=; fh=f4dIorfYpvrEtypEqDl0xAr0U3fgNW6JnHp2tNMuoOs=; b=qDJCYg3yDVtUBcYGzwSrhOPRaTE0jJfTSyuntaHLE1Yj3kkez7k2sUFfZXaG4tunKc 1xwUMrhRhHL7lOKc0doHhk0uiqkZnYi3A+Gz3evTVJ5urLtKCDq0h7LnsfXVbPByH5yk Q+szlfZ/YVISd7+kdkOq50Xkiz11KgS8GApM66p0owzo9c0sxHjr4qngqvzIn3pgqRFC 5pj/P2AN26Du89Zf+AP0TVYvmjBzhg3IOFWkYiNkKFpez0YSfCHlUi8heBGWCvUySNaa VxqGLziSBdDKJ1NkQNV5tp6BinABBeuht31Tke5MnIxDrq0V9Ek5CLr+cSXyBKYjDAYD uk/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dsPfN0hS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q6-20020a635c06000000b005c67196cbf5si9935133pgb.330.2023.12.13.09.07.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 09:07:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dsPfN0hS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 22ABF802FD26; Wed, 13 Dec 2023 09:07:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379000AbjLMRHX (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Wed, 13 Dec 2023 12:07:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235169AbjLMRHP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Dec 2023 12:07:15 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 594EEB7; Wed, 13 Dec 2023 09:07:22 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BDEPklS014035; Wed, 13 Dec 2023 17:06:43 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=1AcIyhIoIAYJEtYsTXVyARk5rQvUQbVh1Ib4zg2TLCE =; b=dsPfN0hSWYs1sLKCm2AmjvcLvn+LO7gg6JnUc0xvnsrE+rR+g5L+J0qzCcv 8wT5veZNZMxs7dynQ+CmbgenCaPOQq7iYptql35iG0f2HlSjh1xS/Td8Sx4kgZOH bgTfl1s2ftDPe+pOXx+HGebMUKuWHRn2mrQcUYDxQKs67BAwlqoE7dwveaEEFJA3 SFJXrtWnpWYqLYLfB8SLONJxlLhAyB3eH5fKfEER3cKs8nPE8p/J4uFb0mLleS8n kUD7v/ec9obubrB4hQFotKAXObffwyoHHMnmrqADpuCAggO2AIfCts8tlY3t4Jbr TthV0LlTItdPgJbGscNny45d6hg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uyec5rdh3-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 NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BDH6fPC024419 (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:42 -0800 Subject: [PATCH 4/6] wifi: ath10k: remove unused template structs MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20231213-wmi_host_mem_chunks_flexarray-v1-4-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: PFG6XjTlsqLAs94-J63S1rJBZS3WW0s2 X-Proofpoint-GUID: PFG6XjTlsqLAs94-J63S1rJBZS3WW0s2 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_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 phishscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312130122 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 09:07:36 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785187279140143255 X-GMAIL-MSGID: 1785187279140143255 |
Series |
wifi: ath10k: use flexible arrays
|
|
Commit Message
Jeff Johnson
Dec. 13, 2023, 5:06 p.m. UTC
Currently both the wmi_bcn_tmpl_cmd and wmi_prb_tmpl_cmd structs
define:
u8 data[1];
Per the guidance in [1] both instances of this should be flexible
arrays. However during conversion it was discovered that neither of
these structs are actually used, so just remove them.
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 | 24 ------------------------
1 file changed, 24 deletions(-)
Comments
On Wed, Dec 13, 2023 at 09:06:42AM -0800, Jeff Johnson wrote: > Currently both the wmi_bcn_tmpl_cmd and wmi_prb_tmpl_cmd structs > define: > u8 data[1]; > > Per the guidance in [1] both instances of this should be flexible > arrays. However during conversion it was discovered that neither of > these structs are actually used, so just remove them. > > 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> Unused! :) Reviewed-by: Kees Cook <keescook@chromium.org>
On 12/13/23 11:06, Jeff Johnson wrote: > Currently both the wmi_bcn_tmpl_cmd and wmi_prb_tmpl_cmd structs > define: > u8 data[1]; > > Per the guidance in [1] both instances of this should be flexible > arrays. However during conversion it was discovered that neither of > these structs are actually used, so just remove them. > > 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 | 24 ------------------------ > 1 file changed, 24 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h > index 37a7d421bd86..e16410e348ca 100644 > --- a/drivers/net/wireless/ath/ath10k/wmi.h > +++ b/drivers/net/wireless/ath/ath10k/wmi.h > @@ -5782,30 +5782,6 @@ struct wmi_bcn_prb_info { > /* app IE */ > } __packed; > > -struct wmi_bcn_tmpl_cmd { > - /* unique id identifying the VDEV, generated by the caller */ > - __le32 vdev_id; > - /* TIM IE offset from the beginning of the template. */ > - __le32 tim_ie_offset; > - /* beacon probe capabilities and IEs */ > - struct wmi_bcn_prb_info bcn_prb_info; > - /* beacon buffer length */ > - __le32 buf_len; > - /* variable length data */ > - u8 data[1]; > -} __packed; > - > -struct wmi_prb_tmpl_cmd { > - /* unique id identifying the VDEV, generated by the caller */ > - __le32 vdev_id; > - /* beacon probe capabilities and IEs */ > - struct wmi_bcn_prb_info bcn_prb_info; > - /* beacon buffer length */ > - __le32 buf_len; > - /* Variable length data */ > - u8 data[1]; > -} __packed; > - > enum wmi_sta_ps_mode { > /* enable power save for the given STA VDEV */ > WMI_STA_PS_MODE_DISABLED = 0, >
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 37a7d421bd86..e16410e348ca 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -5782,30 +5782,6 @@ struct wmi_bcn_prb_info { /* app IE */ } __packed; -struct wmi_bcn_tmpl_cmd { - /* unique id identifying the VDEV, generated by the caller */ - __le32 vdev_id; - /* TIM IE offset from the beginning of the template. */ - __le32 tim_ie_offset; - /* beacon probe capabilities and IEs */ - struct wmi_bcn_prb_info bcn_prb_info; - /* beacon buffer length */ - __le32 buf_len; - /* variable length data */ - u8 data[1]; -} __packed; - -struct wmi_prb_tmpl_cmd { - /* unique id identifying the VDEV, generated by the caller */ - __le32 vdev_id; - /* beacon probe capabilities and IEs */ - struct wmi_bcn_prb_info bcn_prb_info; - /* beacon buffer length */ - __le32 buf_len; - /* Variable length data */ - u8 data[1]; -} __packed; - enum wmi_sta_ps_mode { /* enable power save for the given STA VDEV */ WMI_STA_PS_MODE_DISABLED = 0,