From patchwork Fri Dec 30 18:06:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 37731 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3008356wrt; Fri, 30 Dec 2022 10:08:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXucsLOg1MIe2MrIEOzaQiNVrdIJSQJj8bcJ2XO+jX7C3qtwueY0W+Vqs2P8hVZdTNLebXW6 X-Received: by 2002:a17:902:c404:b0:192:5eee:323a with SMTP id k4-20020a170902c40400b001925eee323amr43761606plk.28.1672423688775; Fri, 30 Dec 2022 10:08:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672423688; cv=none; d=google.com; s=arc-20160816; b=QZmcWXbboXz98NUQythn67/Sl43LIcp1LQl+z32iW5iYIcPAlapqJPwb1Ja3xeeKy1 1kibmkRYxeSemY3PzNslT/tl174WSGSc+H6lZNWbhFWPIiSvAhEU31DDWasM2IYiAMlm Pyrt4FGz1cjABzK56uV1nvKffxW6vqjMTzIlHKNx7qkh84sh941QNZuRiHrfhmn2DNqq 7OQnE1Ci6D6HA7Tf7d7K9EFCRSaiY+Roy/zCoZ0L3xUeq73vn6xUcMM/hNEMbnxYj1Zc 34YoH5JMpHHqbmeIU4ECq3NNO/C3Mk5r9lJKSzqhau9RS78aAm6FpulwRgpCuH/Ba29G DLEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3coU5E3acTy4oiBZxp2FHq/1o6tYDUFQ6gDSxEMc4/M=; b=hJnH3pctuQ53El/KSs6R6eHoqo2rLJTGRhqXIuTPub72fSoWiZI9sEi3nP64ikD43J SJ8FDzWE8WMOWQxQKwa8TASSo4W7IG+CXW0K0LoGO0GfYYW+vrznRP5pjgY8q+q0G47/ /qVCDpH61cuQrkDqwxNL05e+OvLfIVhmJHb6kEPO54jl3ZcyK6M1UyOBcwS5M11NRaa1 Q+eMpdT3JKVKytNAkGHQ3vfd6wP8NVf0ZgIeXBFEEm1rvK9QmccsjBsysfompR3Yhwbc F2CvZtZMgl8H3DwixWky/3knvHYdM2roU+TngDuOX2INFQx4giBRIi7rnu+XZmca91dw DdFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c18-20020a170902d49200b00186f81a0765si23466039plg.540.2022.12.30.10.07.56; Fri, 30 Dec 2022 10:08:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235461AbiL3SHY (ORCPT + 99 others); Fri, 30 Dec 2022 13:07:24 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753663342219742078?= X-GMAIL-MSGID: =?utf-8?q?1753663342219742078?= 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/r8188eu/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) /* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */ - pcmdpriv->cmd_seq = 1; - pcmdpriv->cmd_allocated_buf = kzalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ, GFP_KERNEL); @@ -233,8 +231,6 @@ int rtw_cmd_thread(void *context) ret = cmd_hdl(pcmd->padapter, pcmdbuf); pcmd->res = ret; } - - pcmdpriv->cmd_seq++; } else { pcmd->res = H2C_PARAMETERS_ERROR; } diff --git a/drivers/staging/r8188eu/include/rtw_cmd.h b/drivers/staging/r8188eu/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 */