From patchwork Mon Jan 9 21:28:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 41156 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2391849wrt; Mon, 9 Jan 2023 13:34:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXtby//0k5mwwL5GDJkH3oAGXFAyXvxcz5+9RJYClHhCf0bQeWBfI5rr4sZUA/wc6dZ4N9TT X-Received: by 2002:a17:907:c70c:b0:81e:9027:dedc with SMTP id ty12-20020a170907c70c00b0081e9027dedcmr56795836ejc.39.1673300053539; Mon, 09 Jan 2023 13:34:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673300053; cv=none; d=google.com; s=arc-20160816; b=fdssuBSCccBWpCefM3X4FFvJp2KFBKkCClIv4iWRsyQpwQ+RROep4YmxoU0uJOr5UY 5MhE3azlTLV2rGsKwmzbnyNE8OS3eceW7Kg0vmN77MvZHOWpcLpKA730GQsn8GdyjID2 5v36dcpGQezLiqFk7lHG7pKb1ezm6vnwGYWsFaKW0nf6VZP6t2UoqzTVkDvlbAa/Ffe1 50meep4kx4JEnlZ7S5T7c0At+RKVt0OHfLIhdkKE8Q2NTxRI3RStC4SJLcySrrsZg/MM y+o9km5w6i8zwQBcQyYGNaUG7v747LjyZjhTqV0KtHydgLg3vRlwwDh8G44rD6ZFfVhr vEmQ== 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=3VHIN37mdx1O10AoFulxGo7ZZaU4463DGS8VGSbOa80=; b=P8dq7JKUl73pH8of7vEB94n7ups/yDNxR2jQR7To+oS6fQoG7kQGobBvzM+iwgfUI8 ofBEomfBEM7s6nGxV9B2DNKcMERHsYLlkT/ErgC/S4xWHl82LuuKs4q4O23ASEHhcVLi 5B5WpFIVSdmj0E0uge0kvFgz7I49nyrjVnNfH7FHIJgeFvLQgR3NQ5DK5HcGIJfWZAyr tTjLf+IzZIKkuAptoc2XYLdmdYVRcB9YKM58V9O4RfbaFhcejpYcd1pev1M3u7BPldEG RoGlNdlW0xhjUHCs55BK3KFTH6QBHfzeYD311vW4t/Rt9AJY9LiTsbnfEPZxI+S5wAMg r/1w== 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 w1-20020a056402268100b0047026e8bb8bsi12209728edd.233.2023.01.09.13.33.50; Mon, 09 Jan 2023 13:34:13 -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 S237875AbjAIV3h (ORCPT + 99 others); Mon, 9 Jan 2023 16:29:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237958AbjAIV3S (ORCPT ); Mon, 9 Jan 2023 16:29:18 -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 8A38A6334 for ; Mon, 9 Jan 2023 13:29:10 -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 1pEzhZ-0007iD-HN; Mon, 09 Jan 2023 22:29:05 +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 02/12] staging: r8188eu: bkq_cnt is write-only Date: Mon, 9 Jan 2023 22:28:42 +0100 Message-Id: <20230109212852.75612-3-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?1754482221899707259?= X-GMAIL-MSGID: =?utf-8?q?1754582277165776851?= bkq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove bkq_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 e5ac49441337..875675656d11 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->bkq_cnt = 0; pxmitpriv->viq_cnt = 0; pxmitpriv->voq_cnt = 0; diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index c84f73f2cc59..3d56c3afaf7d 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 bkq_cnt; int viq_cnt; int voq_cnt; struct __queue free_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 067b7def2bde..5ae09edf9174 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -48,9 +48,6 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) case VI_QUEUE_INX: pxmitpriv->viq_cnt--; break; - case BK_QUEUE_INX: - pxmitpriv->bkq_cnt--; - break; case HIGH_QUEUE_INX: rtw_chk_hi_queue_cmd(padapter); break; @@ -123,7 +120,6 @@ u32 rtw_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) pxmitbuf->flags = BE_QUEUE_INX; break; case BK_QUEUE_INX: - pxmitpriv->bkq_cnt++; pxmitbuf->flags = BK_QUEUE_INX; break; case HIGH_QUEUE_INX: