Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6853318rwl; Mon, 9 Jan 2023 14:05:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXvU39ddQ5WOhP58Vqeh6YKtDKI29AjyMrUJqxNchf7H/aurVZiBGD9ojjexLpnpEPbJEaAu X-Received: by 2002:a17:907:3e26:b0:839:74cf:7c4f with SMTP id hp38-20020a1709073e2600b0083974cf7c4fmr76532269ejc.8.1673301911982; Mon, 09 Jan 2023 14:05:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673301911; cv=none; d=google.com; s=arc-20160816; b=ja3samEq8vDPKMADT4cT0reNG+beORSnLosuoenc01nNf3wL0UfAB8j7jZxUQKlLfD Pdn2QmWPSTv74rrUXE3z2W/2KNxeqFtgkEKm3eIlN/lvj4xqs6NL/N/z+NErKHFSSBdA /QNEBuALoYlYKa+18zsG5ZAb8Hkivr/m/H5Xg8XyQU8CgGJ6ilqyOjG3DLPfg0+ly+me mdycNvxd1Dmzirs6TRz+5Cbz7n7za0+R+Y/2CvL2asisR5YlWiUWCfmxgas9DL6sbjyt yr4OF/KM1HppGTz1opcYAeGkaPxuBvJV3MeadJCz8F+MGWNoLGpPLngbyxGw3x4qbsnE MPrg== 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=CfPgYeYZAjB7Ggs1AxFI9UPI632K5V++hia1F6y2Pm4=; b=GOQ6/ioCjGKbZPlTR4abGQoP1GQrLXlS0TB44w14llKMUm+o/gvHh1VBHYOo1roeCA I1o7ljdmzR9g2RaH6CUIGDAD1W1H33t15FKw06X/WbAPnT92VPI9zwnTrPNOzZnuQa8k mITMyxgHUyxVnaDo+Xd+LYO8xAlmZQlPfyfC2tp03h47lmBDdtZbXLHoT22VOqIhJNhL OJg+VCrwu51vUH1xSLno3NN9kFRz3txhsD8FZXAfa0lef4GNL5gOiWaO2pIssopp4awT r99Sx+MtNYRH9VjVwh27BpbW9gOJuET6ppFhuAr7KHT5TJkNj7kJ3dEAlMtW4X+OG//O Yx7A== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a056402518a00b0046c0f2a94dbsi11598847edd.353.2023.01.09.14.04.59; Mon, 09 Jan 2023 14:05:11 -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 S238070AbjAIVa0 (ORCPT + 53 others); Mon, 9 Jan 2023 16:30:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237397AbjAIV3T (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 80D3D2CA for ; Mon, 9 Jan 2023 13:29:12 -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 1pEzha-0007iD-AA; Mon, 09 Jan 2023 22:29:06 +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 03/12] staging: r8188eu: viq_cnt is write-only Date: Mon, 9 Jan 2023 22:28:43 +0100 Message-Id: <20230109212852.75612-4-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 Content-Transfer-Encoding: 8bit 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 viq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove viq_cnt and resulting dead code. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 1 - drivers/staging/r8188eu/include/rtw_xmit.h | 1 - drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 4 ---- 3 files changed, 6 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 875675656d11..1319a7fce8b3 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -195,7 +195,6 @@ int _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxmitpriv->txirp_cnt = 1; /* per AC pending irp */ - pxmitpriv->viq_cnt = 0; pxmitpriv->voq_cnt = 0; pxmitpriv->ack_tx = false; diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index 3d56c3afaf7d..71a7fb33b0d0 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -282,7 +282,6 @@ struct xmit_priv { u8 txirp_cnt;/* */ struct tasklet_struct xmit_tasklet; /* per AC pending irp */ - int viq_cnt; int voq_cnt; struct __queue free_xmitbuf_queue; struct __queue pending_xmitbuf_queue; diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c index 5ae09edf9174..7929b7d5e89e 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -45,9 +45,6 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) case VO_QUEUE_INX: pxmitpriv->voq_cnt--; break; - case VI_QUEUE_INX: - pxmitpriv->viq_cnt--; - break; case HIGH_QUEUE_INX: rtw_chk_hi_queue_cmd(padapter); break; @@ -113,7 +110,6 @@ u32 rtw_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) pxmitbuf->flags = VO_QUEUE_INX; break; case VI_QUEUE_INX: - pxmitpriv->viq_cnt++; pxmitbuf->flags = VI_QUEUE_INX; break; case BE_QUEUE_INX: -- 2.30.2