From patchwork Mon Jan 9 21:28:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 41159 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2391880wrt; Mon, 9 Jan 2023 13:34:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXtHmHKkVOx/NklfQaEBEDISNZx6uEMhW86jchuiDi5KDvTIgHge2EUUDbcb0qxTot/2hLsq X-Received: by 2002:a17:906:1e17:b0:84c:69f8:2ec2 with SMTP id g23-20020a1709061e1700b0084c69f82ec2mr39116885ejj.22.1673300059056; Mon, 09 Jan 2023 13:34:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673300059; cv=none; d=google.com; s=arc-20160816; b=Mdq6mIRIxYI2HE0iq+Weuf8xNQJkclVRKnW5/EMbuDFRgpv4czrzN9lPbgZBpfi6QO 0bVc6hRyxS1YJBmY0pZ9mAqSjZGgnXsxQdVVgvqOcwKyAhSqS3qhGY2hldVnE0cMPXqU PRejsUB/8UmJsNLlbtIroRWYqrzwMdehqMndPN78TMJIxBIm9GBZtlOEUK/13Q5mrwo5 adZ0CLTmdJcMCekzM1IncIkowNV97rXbuxtfN14i6L9RvO1gOZeJ/gE3/73DrLceA4s+ oM7dLHl625R9I+Lw5xyc9Ws/UwqLfx0IwXu2reDG3tmNsoNuzKE88sR/6+sZKEAFiTRU iFCA== 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=3o/Ts9oduFrCTAVGMbpJRARTF/ewErwjybP6BTnL44M=; b=kI4TT4R6DUz4zybB8IDC/uiB5SAy5HRgd+TzJp8nklv17/e1n/ismr2hjfxdJMRHAR iiukcZzdDQSus0WBTHo2JzUb/jofJdN8MLzKpM1bY5FIPdc7PEec8cT43h9IyHp+xRN5 UhiZSKv9fuLoba9mSGBW6U3ByWbcUZCFTu+0jxQh4f85qJK4Em3ZzjTvSPcWeKR01ojt qRMGxQidzmLYgbwMJFIete/fTAgAm6ZYY04WdcJNHrdQVZHwkqPCcpbJ3Tc1zL3sRLgl Nsa80bNpoRmOPeU5sanNUYjeFtbuIVGmHMfVrvMvUUfluRnB+ATo24dNRyhN1MubqFI3 8TQw== 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 ga30-20020a1709070c1e00b007c177fe6023si11743411ejc.256.2023.01.09.13.33.55; Mon, 09 Jan 2023 13:34:19 -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 S237809AbjAIV36 (ORCPT + 99 others); Mon, 9 Jan 2023 16:29:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238064AbjAIV3T (ORCPT ); Mon, 9 Jan 2023 16:29:19 -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 3D99BDFDC for ; Mon, 9 Jan 2023 13:29:13 -0800 (PST) Received: from dslb-188-096-147-178.188.096.pools.vodafone-ip.de ([188.96.147.178] 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 1pEzhb-0007iD-31; Mon, 09 Jan 2023 22:29:07 +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 v2 04/12] staging: r8188eu: voq_cnt is write-only Date: Mon, 9 Jan 2023 22:28:44 +0100 Message-Id: <20230109212852.75612-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230109212852.75612-1-martin@kaiser.cx> References: <20230108185738.597105-1-martin@kaiser.cx> <20230109212852.75612-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?1754482185993808971?= X-GMAIL-MSGID: =?utf-8?q?1754582282764092178?= voq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove voq_cnt and resulting dead code. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 3 --- drivers/staging/r8188eu/include/rtw_xmit.h | 2 -- drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 4 ---- 3 files changed, 9 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 1319a7fce8b3..8211b858573f 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -194,9 +194,6 @@ int _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxmitpriv->txirp_cnt = 1; - /* per AC pending irp */ - pxmitpriv->voq_cnt = 0; - pxmitpriv->ack_tx = false; mutex_init(&pxmitpriv->ack_tx_mutex); rtw_sctx_init(&pxmitpriv->ack_tx_ops, 0); diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index 71a7fb33b0d0..7e6cf745d913 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -281,8 +281,6 @@ struct xmit_priv { * 1->vi, 2->be, 3->bk. */ u8 txirp_cnt;/* */ struct tasklet_struct xmit_tasklet; - /* per AC pending irp */ - int voq_cnt; struct __queue free_xmitbuf_queue; struct __queue pending_xmitbuf_queue; u8 *pallocated_xmitbuf; diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c index 7929b7d5e89e..6fe5a4230291 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -42,9 +42,6 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) struct xmit_priv *pxmitpriv = &padapter->xmitpriv; switch (pxmitbuf->flags) { - case VO_QUEUE_INX: - pxmitpriv->voq_cnt--; - break; case HIGH_QUEUE_INX: rtw_chk_hi_queue_cmd(padapter); break; @@ -106,7 +103,6 @@ u32 rtw_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) switch (addr) { case VO_QUEUE_INX: - pxmitpriv->voq_cnt++; pxmitbuf->flags = VO_QUEUE_INX; break; case VI_QUEUE_INX: