From nobody Tue Sep 16 20:00:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1AC4C4167B for ; Fri, 30 Dec 2022 18:07:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235462AbiL3SHZ (ORCPT ); Fri, 30 Dec 2022 13:07:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235415AbiL3SHO (ORCPT ); Fri, 30 Dec 2022 13:07:14 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2BCE6248 for ; Fri, 30 Dec 2022 10:07:13 -0800 (PST) Received: from dslb-188-097-208-179.188.097.pools.vodafone-ip.de ([188.97.208.179] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pBJme-0004rR-DF; Fri, 30 Dec 2022 19:07:08 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 03/20] staging: r8188eu: cmd_seq is write-only Date: Fri, 30 Dec 2022 19:06:29 +0100 Message-Id: <20221230180646.91008-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221230180646.91008-1-martin@kaiser.cx> References: <20221230180646.91008-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The cmd_seq component of struct cmd_priv is set and incremented but never read. It can be removed. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_cmd.c | 4 ---- drivers/staging/r8188eu/include/rtw_cmd.h | 1 - 2 files changed, 5 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188= eu/core/rtw_cmd.c index 19b2f73d481d..eb79435da355 100644 --- a/drivers/staging/r8188eu/core/rtw_cmd.c +++ b/drivers/staging/r8188eu/core/rtw_cmd.c @@ -65,8 +65,6 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) =20 /* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */ =20 - pcmdpriv->cmd_seq =3D 1; - pcmdpriv->cmd_allocated_buf =3D kzalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ, GFP_KERNEL); =20 @@ -233,8 +231,6 @@ int rtw_cmd_thread(void *context) ret =3D cmd_hdl(pcmd->padapter, pcmdbuf); pcmd->res =3D ret; } - - pcmdpriv->cmd_seq++; } else { pcmd->res =3D H2C_PARAMETERS_ERROR; } diff --git a/drivers/staging/r8188eu/include/rtw_cmd.h b/drivers/staging/r8= 188eu/include/rtw_cmd.h index c330a4435b31..9df7d4bf441d 100644 --- a/drivers/staging/r8188eu/include/rtw_cmd.h +++ b/drivers/staging/r8188eu/include/rtw_cmd.h @@ -32,7 +32,6 @@ struct cmd_priv { struct completion start_cmd_thread; struct completion stop_cmd_thread; struct __queue cmd_queue; - u8 cmd_seq; u8 *cmd_buf; /* shall be non-paged, and 4 bytes aligned */ u8 *cmd_allocated_buf; u8 *rsp_buf; /* shall be non-paged, and 4 bytes aligned */ --=20 2.30.2