From patchwork Sun Jan 8 18:57:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40541 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1817523wrt; Sun, 8 Jan 2023 11:04:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXsXiG+QUElv/GnGKXcGvhTR4IbpuV57V6nzcyRkGmVQEfapF5Cbdn+Is+pF4J3AWgZTLf6k X-Received: by 2002:a17:903:183:b0:189:d066:821a with SMTP id z3-20020a170903018300b00189d066821amr85079261plg.41.1673204690220; Sun, 08 Jan 2023 11:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204690; cv=none; d=google.com; s=arc-20160816; b=A9kp1T0WtKESdhPUz1deu/pM8CZQWDMBQB1KgMWW4sQprGshB3GFL0d/TPcYcRFe8z tNyZrUOe87+MSOSr6rYPcaDLuK7ZfmdmtzNoqh4ZwrL+4iLTa/tHGYq+ZxI/bQu8EzOF 6KMhD/NxPxi/c7Xrr5cOL9zKRM3lu6Ha39gJPmPcANAFqttVRx/OQqrxhEhj9/KEOb1B EU8Ekt2Uo16fwNAk5GVTA09vH8hC9ebWupdRUHB3LXw4NMI+dRtZOO1Qy7tGEw7RMTrD Jpc6njyfCNInTu/r+DbAJMLBMZF24pimTPRz9/myLZGzr82PjjFUAZE6r1/l9FjcNUnb Ipuw== 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=LUvt5LHD6lszCbbeHdQsDWRaJW6uFNPTqo1QOrpr3c0=; b=sue4kuukJpbZ1q4wFRWaDu0XRwr7oBzPYnIYofd0vqNRXR8W52DqMiUK7E5AyjCOaT C1Trj+xv0dxLJwJiSU2kszuCnxgozWIjXK26P49tiqIComXkaXSggEsr6sm6zDsA2VA6 KSBmK96hIIWwQnfuw3IBiaugomwQGLOWrmVGdH1El4iqNJLsIZpEJWZ5Rg4Ij2ceZ/Zt Ya9UX27XNJfXx4HHIqapWRRVeJkaqatT/bIfuqLQHQLTZpAVcvdFd+TJ3JY4K8aqTDcp izF4W0dVXQG44ahaiDfbeCj4RauhDsvzSKgQT5vCvZTkzRTWd4imqX1TY7DJfFjPkF7q iVwA== 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 z11-20020a170902834b00b00193300007f9si1432434pln.253.2023.01.08.11.04.38; Sun, 08 Jan 2023 11:04:50 -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 S236119AbjAHS6D (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233617AbjAHS56 (ORCPT ); Sun, 8 Jan 2023 13:57:58 -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 4DD2EE00C for ; Sun, 8 Jan 2023 10:57:57 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEare-0003b8-UT; Sun, 08 Jan 2023 19:57:51 +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 01/13] staging: r8188eu: beq_cnt is write-only Date: Sun, 8 Jan 2023 19:57:26 +0100 Message-Id: <20230108185738.597105-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482281017983776?= X-GMAIL-MSGID: =?utf-8?q?1754482281017983776?= beq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove beq_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 d224785a747b..e5ac49441337 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->beq_cnt = 0; 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 f8f10c67b764..c84f73f2cc59 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 beq_cnt; int bkq_cnt; int viq_cnt; int voq_cnt; diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c index 220e592b757c..067b7def2bde 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 BE_QUEUE_INX: - pxmitpriv->beq_cnt--; - break; case BK_QUEUE_INX: pxmitpriv->bkq_cnt--; break; @@ -123,7 +120,6 @@ u32 rtw_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) pxmitbuf->flags = VI_QUEUE_INX; break; case BE_QUEUE_INX: - pxmitpriv->beq_cnt++; pxmitbuf->flags = BE_QUEUE_INX; break; case BK_QUEUE_INX: From patchwork Sun Jan 8 18:57:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40537 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1817176wrt; Sun, 8 Jan 2023 11:03:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXunm2xmTd/yE2QRwQKqV3lK1fco3jN6Jns54qcl00lg3JCMTqHP90kC7IrdsB8Y81LKynWF X-Received: by 2002:a62:e814:0:b0:582:c408:3ed1 with SMTP id c20-20020a62e814000000b00582c4083ed1mr19196220pfi.32.1673204633742; Sun, 08 Jan 2023 11:03:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204633; cv=none; d=google.com; s=arc-20160816; b=GvATZZKq7qRlLNLIbFzoP8X+0x9KjkbH3PN8KVqxWD0oWYMhcoUz1WjW65EDDv+L0p XSlUiB1pF/rj7C7zrCtjlNQhHIvf4p4e3rquPAKov5lIf2YfXIpXVJfLpzuRk3mn/fbH kdt7wKn0xLIzlRNAs42RTbe1BMXHw9xkYzSpGlqMtRbKMDQzvqsXFQ2zPaIM5TlhaYkL /D3vmisatuQChZbstEXyXCnXNzuJCPGmcgJaRweBiMfMbu3mjWV/T7bVg4D/HlhePDHz 4E9TmLyBQGOy0NIFVm+/crVbaeuxebC/ntcZX/mZJ1MaBrqUvhX6zgQ9fwuvCB+JaPSJ KWtw== 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=Ua/wPucapAsn9O1NKpWAEqkPTLrSlTeeJE5ea8SPgZlkU2xMubQpfCcLPlId4DM4Un S2xTzbBefHXj7oftVE5LvQQO/EOkHDlW1YnOEJUk+jP1wHk8qQa4aSMOTAfLe5aY7lUQ GnnOQ9etsR8GL3zu7Z3j0lO1u6PDmYoXAmJn8Fq8wGdtD8ooTqTuBcFb/nAVe8uUATBO m1wLpwrFBrsS+SZEDnpokHhtV+imrs5j6jJNqzlyrwMHKJNG4f641cVT0Dx35UzStWIk /1/YyZb2G1VFXn8Hm1iXkOpaLOXAiginlsLX6JbPoH8blehK4mbHk8LI6xnlU+zeHmdZ +UUA== 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 h15-20020a056a001a4f00b0053e9c7939basi7581504pfv.188.2023.01.08.11.03.41; Sun, 08 Jan 2023 11:03:53 -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 S236166AbjAHS6H (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233641AbjAHS56 (ORCPT ); Sun, 8 Jan 2023 13:57:58 -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 92947E00D for ; Sun, 8 Jan 2023 10:57:57 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEarf-0003b8-PP; Sun, 08 Jan 2023 19:57:51 +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 02/13] staging: r8188eu: bkq_cnt is write-only Date: Sun, 8 Jan 2023 19:57:27 +0100 Message-Id: <20230108185738.597105-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482221899707259?= 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: From patchwork Sun Jan 8 18:57:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40535 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1816781wrt; Sun, 8 Jan 2023 11:03:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXvPaeKGVWYtZ16tJxwFo1LP/Q2gApGdGHvyri8op2HN21ractT8N8taGCCiKidpd818CcCg X-Received: by 2002:a17:906:9709:b0:7c0:af5d:c54c with SMTP id k9-20020a170906970900b007c0af5dc54cmr47468916ejx.77.1673204584927; Sun, 08 Jan 2023 11:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204584; cv=none; d=google.com; s=arc-20160816; b=NneIdR7FG0QiLosrSSiTddq4HR5Dlyn+CF2lRly8OVRg28LPjNUVm3FR3yCNaLsGfQ YLyJdB/l3kYUmJhaeyehxxFRi2tRYDv75K8tX8Pl+WqdV4AGVNr1YNdys4B3agGFFiRD 83SsAMrdXIe+I4jU3spiHyvBdTNDN+o9nNS6+9SVsKOkXqy6JpK3uGbsFy/2DBWmj4Ir yO6WtnFdRelT14irSnmQdzJfDOovuV+cvSwKWIVkC/iCpbxwlT88YJ0iEVy0qAUK17cK nNWVeqUJ76hXnQTacaXl8hadUcfjO4L1plTaBZXlyvbGeujV2TEhtunYNy51QJuB1rpP K8fA== 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=wxzznyiEtWMDUaOK1G/plUV2xXw29T9aICnfJQCPK9cEsIYulbqn6GYjhhgKflzuKs 3LOnWWgXfO8ItBQQgfGplp2a8Zh9Z65K6DRjgYsCUhQE7zsCCgg5D9PxUgdQtj4xFu6Q ELiV9q+S+a6qzmY3DT8f9j++uarDH2OeQ0V4G82tmqJawlfFZx+OabjrNT9R+v6rB8mX mxbeeID3CyWE2Cb0An2v0TC/ECqhDoE19nLOUwtuTawuFzAa3Mh6AufRSPwVkNeow7dV dvV+EA1qeg3yjy2byWS6ylT0Tcyq6nC7ndXx+tXNhluoPOb0KEyxLZ0WpjMiE6lEMfhV OhBQ== 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 dr5-20020a170907720500b007c12e19ba40si7539426ejc.666.2023.01.08.11.02.42; Sun, 08 Jan 2023 11:03:04 -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 S236320AbjAHS6M (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234698AbjAHS57 (ORCPT ); Sun, 8 Jan 2023 13:57:59 -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 78FB3E017 for ; Sun, 8 Jan 2023 10:57:57 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEarg-0003b8-Ij; Sun, 08 Jan 2023 19:57:52 +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/13] staging: r8188eu: viq_cnt is write-only Date: Sun, 8 Jan 2023 19:57:28 +0100 Message-Id: <20230108185738.597105-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482170514263874?= X-GMAIL-MSGID: =?utf-8?q?1754482170514263874?= 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: From patchwork Sun Jan 8 18:57:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40536 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1816920wrt; Sun, 8 Jan 2023 11:03:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXvVq/32et/cI9tSXzBWP2lGZ0WTo/R4IgmQ3vB2CZX8xJnwpnbhgxWCbJTPVulLwxLSm2z+ X-Received: by 2002:a17:906:2813:b0:829:59d5:e661 with SMTP id r19-20020a170906281300b0082959d5e661mr53016559ejc.29.1673204599730; Sun, 08 Jan 2023 11:03:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204599; cv=none; d=google.com; s=arc-20160816; b=qPmHK29Jvn534LG4+UXGnAqj9B3Ke5lzBg7mY9QGa/8uLLHwU7hNUPNWvAazaRXbVL CxRr9xq4uiBs8fV/YmKoQSeTpdTqVK4r2xwt3CTKiGmU3+H64NBKtvtNLpnEI6GN0zL6 NlQ0Ve1cFT+j7jNZdhdi7FRnMX7Q9tTA/8eDtmuLm3XNoCpJAeV5lFrv7Dj3G8PccIMz KChi3tPsOBT4Dv50d8H29eHbSi7Bmo0XnxIL2MLNMblrEV7lUGSFm8jNjzkzbjednbik OFXHzbMf+nVfm7uDpl+gPZNGSGO8EcLhvPDDvexBAc4QaO5lW6tSsku+i8FuNMBWGWYA IDAA== 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=z8k8eit6Fh0AiWH5ckaIndaKdeNr+EgLbEcABqpPgHZzpoXrY3bhT/uLy5nFCsHhhJ fiZrMgZXLNhlqOq59WDmSbBAFRxVuA36e0342BHiIrXYXw0rmfsno44vPOZjrs7ValZg tP9To/7ULqnVNhszao3QCOOmiTIMWn+MFCGbEbAfjwCMdlEoNfpC5rboYxONn4nopmMk sz/a+WJokYM+6RPuJGaWWp9yEnYMAENwFkAZLmyTSv/N8IQ6tkO3gWxQ4+3tldX1l1B4 XApM3zUzu5e2ynoO9N9H4F3OBG1O3owCKYTracPprrGnOJMBp9/bfLStadDyxtb5Xc82 YVkA== 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 o5-20020a170906974500b007763cc7093csi7506142ejy.884.2023.01.08.11.02.56; Sun, 08 Jan 2023 11:03: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 S236435AbjAHS6V (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229520AbjAHS6A (ORCPT ); Sun, 8 Jan 2023 13:58:00 -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 3E828E00D for ; Sun, 8 Jan 2023 10:57:59 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEarh-0003b8-Bx; Sun, 08 Jan 2023 19:57:53 +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 04/13] staging: r8188eu: voq_cnt is write-only Date: Sun, 8 Jan 2023 19:57:29 +0100 Message-Id: <20230108185738.597105-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482185993808971?= 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: From patchwork Sun Jan 8 18:57:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40539 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1817330wrt; Sun, 8 Jan 2023 11:04:20 -0800 (PST) X-Google-Smtp-Source: AMrXdXvBOaURvm3AhgdCMq/QcHT8tNG50zgtw4P+wE3x12Fmwmnq0XWc9BNJmJpYszReXooLM5UN X-Received: by 2002:a05:6a20:6916:b0:b5:db27:90f4 with SMTP id q22-20020a056a20691600b000b5db2790f4mr609462pzj.47.1673204659699; Sun, 08 Jan 2023 11:04:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204659; cv=none; d=google.com; s=arc-20160816; b=WcLMtYbwnalgMis88/GZ2rzCIE6/YFv8iPqa33dQpJbW4JpVnmIcLZJcVQAjJAlztO 30bJlHwRv6IiO6TzrJ0w45PF2USIjPxwg3EEuzhjhfRBCWC5Ok/PqC+d0ytd+BPI2usU p4EA3uRtd2/vdzZyqPOuL8hsARTHbIviax8y2dBc2rgDYCgEf3BsaIp+DlicaBcJ9gIb 1dMdX6t7joXhfRNo7l0nBrn0bK0l5OdY4QGA0DMi+kXKO/4kndzi8bJLo20o6nDCDtVc TGvvWdGDxpCx3MS8hEjRCI0omnfT7kB8CrTF8wrUYM8oPfJ7hdRSgNMgkdshB/2QAzoW R5bw== 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=6oOP7ilBexgfwk3Jyb0OkYMvM8WjBu93eowsRHI+rxc=; b=zHZ2kUV5hKmdktm6bM+zPxAEq4ks+zZB03GmY0dJA+CsFEpUNZvaFwFeb59pv5kPZb ZvFNA0+nhn8d/yVcQdMyCVdswqSV1TrOuPCRiHn2cVYqqNSRcHwcx2Zr/6hDtZm21jPK 4vG2aYnY8YF6nHlGjC6S/2QSH05XyPfHi+lU8IOq+FxfFKy8BwlVTadTESyVYkkR4ZoF XdTqTw+UKLMJrAUypcAY8H8mzYA4sP6DC+MrVU7jhxd1d+whQoiqA+VyVchjW8A26F2N LcQwCxTLQkQJebR3TXJFD1YRrXHbo+BNAPVTOmEF4wRv65ybFJIjW26RrprxTapNy8Dt YG1g== 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 i12-20020a63e44c000000b004772bd28105si7551158pgk.831.2023.01.08.11.04.07; Sun, 08 Jan 2023 11:04: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 S236373AbjAHS6P (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235893AbjAHS6A (ORCPT ); Sun, 8 Jan 2023 13:58:00 -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 D7DB6E02E for ; Sun, 8 Jan 2023 10:57:59 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEari-0003b8-4b; Sun, 08 Jan 2023 19:57:54 +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 05/13] staging: r8188eu: replace switch with if Date: Sun, 8 Jan 2023 19:57:30 +0100 Message-Id: <20230108185738.597105-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482248796762661?= X-GMAIL-MSGID: =?utf-8?q?1754482248796762661?= The switch statement in usb_write_port_complete has only one single case. Replace it with an if statement. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c index 6fe5a4230291..257bcf496012 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -41,13 +41,8 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) struct adapter *padapter = pxmitbuf->padapter; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; - switch (pxmitbuf->flags) { - case HIGH_QUEUE_INX: + if (pxmitbuf->flags == HIGH_QUEUE_INX) rtw_chk_hi_queue_cmd(padapter); - break; - default: - break; - } if (padapter->bSurpriseRemoved || padapter->bDriverStopped || padapter->bWritePortCancel) From patchwork Sun Jan 8 18:57:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40547 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1818968wrt; Sun, 8 Jan 2023 11:08:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXu9RHFlQwbnLmFsfWDTOJRWmpnSLQGzH0Z4Dr4pocliduM1MmO4rz683qgA7075KmCss2dG X-Received: by 2002:a05:6a20:b297:b0:9d:efbf:7880 with SMTP id ei23-20020a056a20b29700b0009defbf7880mr64673688pzb.53.1673204928735; Sun, 08 Jan 2023 11:08:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204928; cv=none; d=google.com; s=arc-20160816; b=fTFfAVUIdXf7EZruCD6LKgy/FRJYe2V1cT6x8CZ46nOEyog2fNImJIrRifp+IDiJrF kimhsCV8pEOSlPwfI/lhAwAE8DkDjHp1bTCGGmML34xfnvjin9CRyuD+tp/pEffK2GmI LuN6tYXJJTMr0DJRZKYB1QqQTyRCMPMFa/YBpviQklfLRh1sIBTgnrav86+ZxhSppwdz eO+t7vTO3eGDzryLlcIhKjO+Rf2ZuQ+9LeEFijZWmoO7oZGCQewlI2pLR2RUCB+kGazz 2RlDbepFf7oX2R8sjPZayfrGNIu74iNIgUxY2d3/aYzKIunzw+1iMb0N+9aNDFL4XViA sjpA== 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=PY0VlsgrVl/sK6zaC477MUVyc2aqp4UHobjVkHm/JGY=; b=Y6/8TEg3hsUR4l9QG95ziTfTfZxlo2QE2/Qx5gAhNqEZsvIHSTcH+B2QrynLm6I3+N E/CpDoPRUI6USH5c8LbZcL1nzYvAm1AxImrxXxNLeZQNoeUMNo2f9QqW8f2Mkpes7GRG phMA9pns+Q2SoTQEuCbAlfoWguyVheojzYP1w0tkgS1skryx5UbxfLdvzlmhMSEU39DY agwSUTfRm1Q+FEsj0TdCN9+19/Oik5cN+l9iv3lcFlY9A3lYYhXcJHMLfdX84Txp5F5Y Fc/DplvLDPamLT73YcxbXbJ7rfEAh9WQ44bYmY54zpvRnZpN6+uEBp1pVcJQ5szyvIVT cR2w== 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 w62-20020a638241000000b004b3b04315cbsi1033698pgd.365.2023.01.08.11.08.36; Sun, 08 Jan 2023 11:08:48 -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 S236573AbjAHS6b (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235956AbjAHS6C (ORCPT ); Sun, 8 Jan 2023 13:58:02 -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 51601E00C for ; Sun, 8 Jan 2023 10:58:02 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEari-0003b8-UQ; Sun, 08 Jan 2023 19:57:55 +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 06/13] staging: r8188eu: make rtl8188eu_inirp_init a void function Date: Sun, 8 Jan 2023 19:57:31 +0100 Message-Id: <20230108185738.597105-7-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482531385588032?= X-GMAIL-MSGID: =?utf-8?q?1754482531385588032?= rtl8188eu_inirp_init's return value is not checked by its caller. Make rtl8188eu_inirp_init a void function. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/usb_halinit.c | 14 +++----------- drivers/staging/r8188eu/include/hal_intf.h | 2 +- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index d28b4dc2a767..afa24a59fbb3 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -851,29 +851,21 @@ u32 rtl8188eu_hal_deinit(struct adapter *Adapter) return _SUCCESS; } -unsigned int rtl8188eu_inirp_init(struct adapter *Adapter) +void rtl8188eu_inirp_init(struct adapter *Adapter) { u8 i; struct recv_buf *precvbuf; - uint status; struct recv_priv *precvpriv = &Adapter->recvpriv; - status = _SUCCESS; - /* issue Rx irp to receive data */ precvbuf = (struct recv_buf *)precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { - if (!rtw_read_port(Adapter, (unsigned char *)precvbuf)) { - status = _FAIL; - goto exit; - } + if (!rtw_read_port(Adapter, (unsigned char *)precvbuf)) + return; precvbuf++; precvpriv->free_recv_buf_queue_cnt--; } - -exit: - return status; } /* */ diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h index ac6e3f95c5b7..767f97c5f85d 100644 --- a/drivers/staging/r8188eu/include/hal_intf.h +++ b/drivers/staging/r8188eu/include/hal_intf.h @@ -26,7 +26,7 @@ void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_level); int rtl8188e_IOL_exec_cmds_sync(struct adapter *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt); -unsigned int rtl8188eu_inirp_init(struct adapter *Adapter); +void rtl8188eu_inirp_init(struct adapter *Adapter); uint rtw_hal_init(struct adapter *padapter); uint rtw_hal_deinit(struct adapter *padapter); From patchwork Sun Jan 8 18:57:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40540 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1817465wrt; Sun, 8 Jan 2023 11:04:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXvNnmAlnET7DpUwjWu4byWXlafO+GSGsrUMd6tDYZOV1g4jX57h2cSeqJuth3JJOXQu7P4j X-Received: by 2002:a05:6402:22b2:b0:467:7c73:4805 with SMTP id cx18-20020a05640222b200b004677c734805mr28602219edb.5.1673204683851; Sun, 08 Jan 2023 11:04:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204683; cv=none; d=google.com; s=arc-20160816; b=e6/qKzdtGZonDkdrSrXvkglYlQrJv4y5akCAHWxMsXpTR9YlXN9fTZ4ygv+D49mOgx BJQNdnmnZdQdmF2SkF8bYlIhbtYD6kMiamtXmHazfkWQy6Kd6FUC02/cd11VDC4dOjPm N+QHQfYUcBFqUj27pbwCLY3zvfLs61bHiocXPyB28Q5yPRCLhwdg/9wtsdq9nhLhBNOe F7N2AUMX3r71a3mGv/IdiiXyITEbFHxmpiTANnZupdP2h8Zi/ExcPUIPBTBObj/M9OjD zvjivPr5m2YDu/YmVF4C/VbrmKShBmgN0VwlA1BUfpHOriJYNIsbOez53moVj48Mm00y Xz2w== 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=w8e3f9MiQDynXs9Ob+peElZ7pOQAza+KiujRZsOB4lY=; b=ULRxllRJ2hqMGor9gk3pcN7VZVv81CDSQJVWEFsZdpBlkNs4umwwtN5uVQhGol7RFb xOcSNf/iezWPwWN0+QOk5K/woXi99BpQj+TjUZ085DxOdlpR3vfPnhAB4SBoMlXbM7/F aUHp4J6Jqz8FKwk9/IrMKgXKY0At7BUQGjyWHu0uXQBD6P+4kcPGd84sITgBvaKKkt7q 00634+rRu7RSjqV5Ad/ssZ/5HaXICCaWG04yvWTJsHGfGwzz2GTGLiW9LucazR2pLFjS h3Ug1v9FBPmX4vwiskqlluPlSEpgaeoIYFqC5kfwgRqUmCFu/B8KIatBgx5bOnaSXX2L e2fQ== 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 l15-20020aa7c3cf000000b00469d35e2f13si6991755edr.522.2023.01.08.11.04.16; Sun, 08 Jan 2023 11:04:43 -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 S236474AbjAHS6Y (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236049AbjAHS6C (ORCPT ); Sun, 8 Jan 2023 13:58:02 -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 641BAE0D3 for ; Sun, 8 Jan 2023 10:58:01 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEarj-0003b8-O0; Sun, 08 Jan 2023 19:57:55 +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 07/13] staging: r8188eu: dir_dev is unused Date: Sun, 8 Jan 2023 19:57:32 +0100 Message-Id: <20230108185738.597105-8-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482274690192981?= X-GMAIL-MSGID: =?utf-8?q?1754482274690192981?= dir_dev in struct adapter is not used by the r8188eu driver. It can be removed. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/drv_types.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h index 8fef5759c36a..4803d0c77d70 100644 --- a/drivers/staging/r8188eu/include/drv_types.h +++ b/drivers/staging/r8188eu/include/drv_types.h @@ -187,7 +187,6 @@ struct adapter { int bup; struct net_device_stats stats; struct iw_statistics iwstats; - struct proc_dir_entry *dir_dev;/* for proc directory */ int net_closed; u8 bFWReady; From patchwork Sun Jan 8 18:57:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40548 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1819014wrt; Sun, 8 Jan 2023 11:08:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXsahkcJNyg/IWsjdspmrabXccphfSDIMhyNWiVFrJV3l2eUYeSPW1VC8lA70FJEP9lzrzhX X-Received: by 2002:a17:907:8746:b0:7c1:413d:5b0 with SMTP id qo6-20020a170907874600b007c1413d05b0mr59985132ejc.47.1673204939641; Sun, 08 Jan 2023 11:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204939; cv=none; d=google.com; s=arc-20160816; b=NH8mHc0RHLC/VZBhlNkMrod8OD70q2k3LeSpc7mZjAp6x1RzSTidaXO9u+m15tsJMV zzhsZ4pUyYx9Dzfu2W1ZWPVWlno6l2i7/dPp+oKHo9xYUDe6SO5Y990WpdoLwp9VwrsB PZSb8NIU/bIFusm/L14I4CWDdK8/fVOnnuwE/dfvc2ffZgCjLjqsd18omOClKbuNqZoK cSHcML3gUuQIbKg7unMga21J9qCyCagsgcjrFWxk0vveM3kGxyl2s/9pW5Z9wsPXaRM5 Wfn7YkRHsnDMam+FbESQ4kNKp0W7WGxB68/f8bsERSEye4kSo1g+W4V1/Vnk13u4agIN 7jPg== 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=860iR02L4Tbmwy+I2/Ebfn/EV5xhfhk6sK1bI7u1JM8=; b=JdE+WtZ4FGBdfXJzMLyyjaxAIJ/WW/vCdwLbfZr7lN266S6ms8SJ8Hg8AIOZYCnFq2 +UM6Si05gWPqp9i0vLa5ueRpJVW2n2NgH0L2G4yNO2FESEyC+y5v+7w4GrXs1+Lmg48l S/eRHP+DzgPIiqrUm0hNtRGRu25qa2XO9KutB9H1EfHL48+ofE22CC9VN1kyu7xvdup1 cSPmGCahLkuvs9R+x8YoRHJTU1MaGmWY+y4B1AIV/1sb7VgATNLk4Ey5Pv4y+SyVq4qB 7P+3hu6KEK2ANOQ6tSfyT6lEpxYdgBC9Y3fee6XhllPMnFnNt9D5QFsIh/z8ltPQALg6 OaCQ== 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 wg10-20020a17090705ca00b007c18ffbf16esi8288716ejb.433.2023.01.08.11.08.36; Sun, 08 Jan 2023 11:08:59 -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 S236497AbjAHS61 (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236073AbjAHS6C (ORCPT ); Sun, 8 Jan 2023 13:58:02 -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 5D418E01D for ; Sun, 8 Jan 2023 10:58:02 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEark-0003b8-GJ; Sun, 08 Jan 2023 19:57:56 +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 08/13] staging: r8188eu: remove unused hal_xmit_handler define Date: Sun, 8 Jan 2023 19:57:33 +0100 Message-Id: <20230108185738.597105-9-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482542681672112?= X-GMAIL-MSGID: =?utf-8?q?1754482542681672112?= hal_xmit_handler is not used by the r8188eu driver. Remove it. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/rtl8188e_xmit.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/r8188eu/include/rtl8188e_xmit.h b/drivers/staging/r8188eu/include/rtl8188e_xmit.h index 82439f52b0c8..230ea191d256 100644 --- a/drivers/staging/r8188eu/include/rtl8188e_xmit.h +++ b/drivers/staging/r8188eu/include/rtl8188e_xmit.h @@ -134,7 +134,6 @@ void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc, s32 rtl8188eu_hal_xmit(struct adapter *padapter, struct xmit_frame *frame); s32 rtl8188eu_mgnt_xmit(struct adapter *padapter, struct xmit_frame *frame); s32 rtl8188eu_xmit_buf_handler(struct adapter *padapter); -#define hal_xmit_handler rtl8188eu_xmit_buf_handler void rtl8188eu_xmit_tasklet(unsigned long priv); bool rtl8188eu_xmitframe_complete(struct adapter *padapter, struct xmit_priv *pxmitpriv); From patchwork Sun Jan 8 18:57:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40546 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1818969wrt; Sun, 8 Jan 2023 11:08:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXvwziDBilzZG+IkOrLDItIAAt9OYif3gjekGQTXf0Y62erUmZEweEaAYA2QmEa0OYSLw9Ky X-Received: by 2002:a17:90a:2b0d:b0:226:e59a:f86a with SMTP id x13-20020a17090a2b0d00b00226e59af86amr8485372pjc.10.1673204928732; Sun, 08 Jan 2023 11:08:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204928; cv=none; d=google.com; s=arc-20160816; b=GGJeRzdx8jD/tSH8JcjVGgYaTsjNsX6CKRNa/LYZGCIRcEI5O62HtpRTbBJpR70rOH A+FoolScsoTA46roxTu9qGLzNm89gh1Z13rYjnuGLjntJllhr12VuZyVjrSEEUd46Len 3mCAniH4dz8SacNkphV357c+pHGgEhCU8l8zfQIKO/Q9T3Kdt9jR9Z0m2F93tiuE/y+i /nwquZTMOYp00cNzGO5gJPh5u5C5G5AdIyQ+Ovv/MF91Jts/HKD/jRrQ5MgBa/dwFocU fLI2YeF8tus6zCdX8I11EQghuuV5UrLab/I/9a9eAj7w9z4GVVT0uRpFUPe+Pu55/Tto I2ZA== 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=cMJ3ceXvxgPdEbPMxQqDRLI8Ognh9U7d/fpuwhuSCfE=; b=Tg95bM9gSjDL0MGoegi/IRwNX/J33Tgtt8nk9Y+QHc5NZxdosCXai0ThYRhnHJQdTX LZqUJLal4RvA+E2GDt9WZRcAzrgkpP3eiC1f7yorexBg/i0Q4NYQd3AfmLVRbrh5pOmg I+lb02XC2fcENmQl9DkwfRFzu1A/5zhUX8zklXQirDihyvqE0kdj6u7t7fslAkHpPj+U njd+ZG8vCaAxg7Ya/Yo4tnz5T7vNyZcMFdth75DvXCw2hUSzTpYaf91k7SrhyoE1z7M5 F5I7PVBlmNnMDezkZFRhUJ2j3PH6+AClI4vos1x6oHv60cwh6JVuu5K/4sMac38vSuNv PZEg== 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 l12-20020a63ea4c000000b00477810a445asi8249419pgk.589.2023.01.08.11.08.36; Sun, 08 Jan 2023 11:08:48 -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 S236534AbjAHS62 (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236095AbjAHS6D (ORCPT ); Sun, 8 Jan 2023 13:58:03 -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 9CFACE00F for ; Sun, 8 Jan 2023 10:58:02 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEarl-0003b8-JN; Sun, 08 Jan 2023 19:57:57 +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 09/13] staging: r8188eu: txirp_cnt is write-only Date: Sun, 8 Jan 2023 19:57:34 +0100 Message-Id: <20230108185738.597105-10-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482531399476094?= X-GMAIL-MSGID: =?utf-8?q?1754482531399476094?= txirp_cnt in struct xmit_priv is initialised but never read. Remove it. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 2 -- drivers/staging/r8188eu/include/rtw_xmit.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 8211b858573f..1cd560630de3 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -192,8 +192,6 @@ int _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) for (i = 0; i < 4; i++) pxmitpriv->wmm_para_seq[i] = i; - pxmitpriv->txirp_cnt = 1; - 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 7e6cf745d913..50d9311d3e40 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -279,7 +279,6 @@ struct xmit_priv { u8 wmm_para_seq[4];/* sequence for wmm ac parameter strength * from large to small. it's value is 0->vo, * 1->vi, 2->be, 3->bk. */ - u8 txirp_cnt;/* */ struct tasklet_struct xmit_tasklet; struct __queue free_xmitbuf_queue; struct __queue pending_xmitbuf_queue; From patchwork Sun Jan 8 18:57:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40543 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1817848wrt; Sun, 8 Jan 2023 11:05:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXshPzcL/GWPF65vsrFf+yFAEWQFlvtxv8iv4KZrYMK5d8196QzhfDC6qL9zA4Bn1OB8wB+r X-Received: by 2002:a17:90a:6609:b0:225:dec8:e81b with SMTP id l9-20020a17090a660900b00225dec8e81bmr60290752pjj.15.1673204743278; Sun, 08 Jan 2023 11:05:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204743; cv=none; d=google.com; s=arc-20160816; b=bKzqUsQQMA+6y65JWgcoQcfSkrWILWZnnETXLrynltAy+AqlH2/YxXqfDI01qmm0mD oOURp6o1qjUuL6EIrpRSyi3I+RiM82hh572nPScRQ+vupHwjbEsJ5wXGlYyMsukyr5DI 7WJrVUahw/kcpuoVwwDqld786wjSkrcu/Ju0p78W6Boo75jMx0plOwBhir6+bhWFMjbH NQA3RaBrBGrstKWCDAUxZUqMJxqlkqqIWU52TKwKrydGSIJDZb1Vx07yWnD7x51DrvBr q9Wq5raoMSKK0LtfTtu1EN4NeRz07APjbWThdoIt8K5ItfqvgGzz9IfsL99joP7kFq74 Pstg== 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=zmj6B4W2C19ewXOE/HN08ZvPB2GISpNLc553x9MAYSo=; b=kvIR2cb7HtNbbpHTLCmlQHLjqfR5zdkbyL/x2xzP36IsSMT1VwZpHrACq/e+GCo9Zf rLj/VJxpuugc6nns5FlOR2yTeIVCtszT/IMtMkGTVb5SowFdxhHQQSZPliAZFwAd+aTS 9vqe6gqQHu0EaGTgQEnC34PDeiGqnH1DMOGnwtfTNNxKGXwDSjt+Now64KZCGPZBTlTY mk5wq4cnw6pBNpp5d1Ipj+wl2HXlXjkNM11e3RjeZWcyNR7APRakfKmTObDmGJRvgO+y bJg9S+HG5qTnNyP/8uU6T0XD5sMRbEcjw0COCe/WIN/abhuH1TUyqWHMA9MdwwmRrxYj +3ww== 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 na6-20020a17090b4c0600b002262ce26628si8721745pjb.184.2023.01.08.11.05.31; Sun, 08 Jan 2023 11:05:43 -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 S236654AbjAHS6n (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236230AbjAHS6F (ORCPT ); Sun, 8 Jan 2023 13:58:05 -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 B68EBE00F for ; Sun, 8 Jan 2023 10:58:04 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEarm-0003b8-GV; Sun, 08 Jan 2023 19:57:58 +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 10/13] staging: r8188eu: remove unused QSLT defines Date: Sun, 8 Jan 2023 19:57:35 +0100 Message-Id: <20230108185738.597105-11-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482337162099300?= X-GMAIL-MSGID: =?utf-8?q?1754482337162099300?= Remove unused defines for Queue Select Value in TxDesc. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/rtl8188e_xmit.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtl8188e_xmit.h b/drivers/staging/r8188eu/include/rtl8188e_xmit.h index 230ea191d256..e6d343ffc148 100644 --- a/drivers/staging/r8188eu/include/rtl8188e_xmit.h +++ b/drivers/staging/r8188eu/include/rtl8188e_xmit.h @@ -5,17 +5,7 @@ #define __RTL8188E_XMIT_H__ #define MAX_TX_AGG_PACKET_NUMBER 0xFF -/* */ -/* Queue Select Value in TxDesc */ -/* */ -#define QSLT_BK 0x2/* 0x01 */ -#define QSLT_BE 0x0 -#define QSLT_VI 0x5/* 0x4 */ -#define QSLT_VO 0x7/* 0x6 */ -#define QSLT_BEACON 0x10 -#define QSLT_HIGH 0x11 #define QSLT_MGNT 0x12 -#define QSLT_CMD 0x13 /* For 88e early mode */ #define SET_EARLYMODE_PKTNUM(__paddr, __value) \ From patchwork Sun Jan 8 18:57:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40538 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1817206wrt; Sun, 8 Jan 2023 11:04:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXtXqi7beePsUsnVLL+K8VICtaFbRJFWqtrWRuwaivdi6pcFb/4w0+uR9Ue06uXdXc5hiCcH X-Received: by 2002:a17:906:c0ce:b0:7ad:d7a4:4346 with SMTP id bn14-20020a170906c0ce00b007add7a44346mr65227664ejb.66.1673204640142; Sun, 08 Jan 2023 11:04:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204640; cv=none; d=google.com; s=arc-20160816; b=FBVa5Q88F3rUzSpcXQ3i4vrCJ8000jq9/xvAAxo1uCVOVcsBibVQUCDtnWNZ6CDwAU lI8RM5TlQfYv2YbF6iKjcp30YzyOfMB6fzKP9BCNGXEhlJR/tWJXRqQOs3y/StJSEOnK cRJ5ovVQBVj9yHgTj97hed/fp45YArI0M4S49jQn92o4vv+4Pbr5OKQfypKWyBC8nmbH LLFVyvI0g931ecGApk/KWMe/wZwpkQgtADUcdNEmegVTsR3z1qrDMJ8qQLSTdcudeQXf 23TnwZd9UtFgb2SUodzJE2nynsCoS32h8NA51j+s5+ZSsHyZuKvWbV9IxCs0cd3lPH9B m55Q== 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=JX6LmtZgJ53Yaz7p87fAJxDajWoCqryVHDcRom3VzTE=; b=C5aqmsT7z6Y9sjHVUx8ehPIdDnVnqN654/w4utHh2FhnpsWKF/w9E5hCzcar0JCPCb DKhpN4Qvu78wHEZ+EYbxPIsV1wD/Bx8gS6s8SFzwHgYKTmXRyeIiegioXV4hqCHnOU3L EEr31bxIvtu0yM0HYqeDXnTtRaogEA4mZDKaHk2JYZsssBXD2BF/QQL/gRb15r/oiUw6 uY8MJUL/OPDh87nJbdCCUYIsJc7+C9dtfkaNI+jYnuBcTwfMWCu/Vu6Y1sA6LmKRwtKI fF5wzKmAJ71/NlxHHCf/InOOCqZgfY2nT+LnY/TuUK9cgVUt/mccBaa7hSx0s0nNBLEB UaDQ== 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 dr21-20020a170907721500b007ae86742c39si7649698ejc.504.2023.01.08.11.03.37; Sun, 08 Jan 2023 11:04:00 -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 S236621AbjAHS6h (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236129AbjAHS6E (ORCPT ); Sun, 8 Jan 2023 13:58:04 -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 A75B3E0D3 for ; Sun, 8 Jan 2023 10:58:03 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEarn-0003b8-BG; Sun, 08 Jan 2023 19:57:59 +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 11/13] staging: r8188eu: xmit_priv's vcs_type is not used Date: Sun, 8 Jan 2023 19:57:36 +0100 Message-Id: <20230108185738.597105-12-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482228503280732?= X-GMAIL-MSGID: =?utf-8?q?1754482228503280732?= The vcs_type component of struct xmit_priv is not used. Remove it. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/rtw_xmit.h | 1 - drivers/staging/r8188eu/os_dep/os_intfs.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index 50d9311d3e40..77d79c43209f 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -269,7 +269,6 @@ struct xmit_priv { struct adapter *adapter; u8 vcs_setting; u8 vcs; - u8 vcs_type; u64 tx_bytes; u64 tx_pkts; u64 tx_drop; diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c index 2f59bb994796..ae03d39de092 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -394,7 +394,6 @@ static void rtw_init_default_value(struct adapter *padapter) /* xmit_priv */ pxmitpriv->vcs_setting = pregistrypriv->vrtl_carrier_sense; pxmitpriv->vcs = pregistrypriv->vcs_type; - pxmitpriv->vcs_type = pregistrypriv->vcs_type; pxmitpriv->frag_len = pregistrypriv->frag_thresh; /* mlme_priv */ From patchwork Sun Jan 8 18:57:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40542 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1817693wrt; Sun, 8 Jan 2023 11:05:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXvc/ppbRJD7HlQPgjq5JNHwO8PoRNNCSe14c5/6XTfk3aMRDZI5CrTrSpeX5wOVIt6vAc0q X-Received: by 2002:a05:6402:2932:b0:47e:bdb8:9133 with SMTP id ee50-20020a056402293200b0047ebdb89133mr61659278edb.38.1673204717105; Sun, 08 Jan 2023 11:05:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204717; cv=none; d=google.com; s=arc-20160816; b=e1SSHDrZLab6IrnzYT86+NeKV6gyqtksYKFCVB3Bo7fE7E4MADiT8ezikwad4V5Gs+ NsGtUotohxeVHamzHRUgX3EqoZWYw6A5ENUbcUTlA0oxv5GfTYtMzN2lxATC+wwW7jFv 8UKTGq0Rle5/kNPrbpf/KmDmqAUQ3GTUOlTFvN1ebKmFfbI546/Wb3Hp0ubAGeKlS2v4 VBb+nPHO7Sg3By9jgIgEQGOCJG04b/svU0Mz0u6MFD+zGgxieFgiQW6cz0xcsMo+24Y/ zVIVq6aRSdVERyncX4FBr6luaU8mG9oTtIJVAJUNUfaKNkGfI8oOQrb3gDBVYUQgtk8i xoJA== 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=SFilvH1g/Bb+qK7QsmXseOAddGVaE8m9tWzulwv+2ZM=; b=rJW/da8avbiO8dx3rIgnmL8IuoeZC/+BjOjXNB+R158OZTD2adtAM3GFAsFMg9w3eu yAVL3KABMoF93rQq3XYuZk9e2MLt7cLR9u4/sGVM5pywuT7U89KFn4xk6+wgI+Mq0DrM JQbhLtpoMHF0ieqBQRch5F660vjnIpNoV60DydrjFmOSmiU273CYDkopY+K/088MzmM2 42kpMQQY0jBotRIZbwDnLhi7Tlu/OqBKRXQ6AXXFNLfF/XIjzAJWosO3u73IUGankrY+ T/6v4ZhYStuF8oldetSGBImzyOLpoQM+nLOqme0/ezVw/pXpJ8upqPKFEzNRskdUfnMl Q/6A== 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 ji1-20020a170907980100b0084514612c2fsi7338488ejc.613.2023.01.08.11.04.54; Sun, 08 Jan 2023 11:05:17 -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 S236095AbjAHS6x (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236242AbjAHS6G (ORCPT ); Sun, 8 Jan 2023 13:58:06 -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 9704EE00C for ; Sun, 8 Jan 2023 10:58:05 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEaro-0003b8-H6; Sun, 08 Jan 2023 19:58:00 +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 12/13] staging: r8188eu: xmit_priv's vcs is not used Date: Sun, 8 Jan 2023 19:57:37 +0100 Message-Id: <20230108185738.597105-13-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482309541555366?= X-GMAIL-MSGID: =?utf-8?q?1754482309541555366?= The vcs component in struct xmit_priv is set but not used. We can remove vcs and the rtw_update_protection function, whose only job is to set vcs. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme.c | 5 ---- drivers/staging/r8188eu/core/rtw_xmit.c | 34 ---------------------- drivers/staging/r8188eu/include/rtw_xmit.h | 2 -- drivers/staging/r8188eu/os_dep/os_intfs.c | 1 - 4 files changed, 42 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index b272123626ac..fb7d0e161fdd 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -444,8 +444,6 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex if (check_fwstate(pmlmepriv, _FW_LINKED) && is_same_network(&pmlmepriv->cur_network.network, pnetwork)) { update_network(&pmlmepriv->cur_network.network, pnetwork, adapter, true); - rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof(struct ndis_802_11_fixed_ie), - pmlmepriv->cur_network.network.IELength); } } @@ -1027,9 +1025,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net break; } - rtw_update_protection(padapter, (cur_network->network.IEs) + - sizeof(struct ndis_802_11_fixed_ie), - (cur_network->network.IELength)); rtw_update_ht_cap(padapter, cur_network->network.IEs, cur_network->network.IELength); } diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 1cd560630de3..8b055e3fbfa5 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1099,40 +1099,6 @@ s32 rtw_put_snap(u8 *data, u16 h_proto) return SNAP_SIZE + sizeof(u16); } -void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len) -{ - uint protection; - u8 *perp; - int erp_len; - struct xmit_priv *pxmitpriv = &padapter->xmitpriv; - struct registry_priv *pregistrypriv = &padapter->registrypriv; - - switch (pxmitpriv->vcs_setting) { - case DISABLE_VCS: - pxmitpriv->vcs = NONE_VCS; - break; - case ENABLE_VCS: - break; - case AUTO_VCS: - default: - perp = rtw_get_ie(ie, _ERPINFO_IE_, &erp_len, ie_len); - if (!perp) { - pxmitpriv->vcs = NONE_VCS; - } else { - protection = (*(perp + 2)) & BIT(1); - if (protection) { - if (pregistrypriv->vcs_type == RTS_CTS) - pxmitpriv->vcs = RTS_CTS; - else - pxmitpriv->vcs = CTS_TO_SELF; - } else { - pxmitpriv->vcs = NONE_VCS; - } - } - break; - } -} - void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe, int sz) { struct sta_info *psta = NULL; diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index 77d79c43209f..abac0103b53a 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -268,7 +268,6 @@ struct xmit_priv { uint frag_len; struct adapter *adapter; u8 vcs_setting; - u8 vcs; u64 tx_bytes; u64 tx_pkts; u64 tx_drop; @@ -311,7 +310,6 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf); void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe, int sz); -void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len); s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattrib); s32 rtw_put_snap(u8 *data, u16 h_proto); diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c index ae03d39de092..f022f6b1cf3e 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -393,7 +393,6 @@ static void rtw_init_default_value(struct adapter *padapter) /* xmit_priv */ pxmitpriv->vcs_setting = pregistrypriv->vrtl_carrier_sense; - pxmitpriv->vcs = pregistrypriv->vcs_type; pxmitpriv->frag_len = pregistrypriv->frag_thresh; /* mlme_priv */ From patchwork Sun Jan 8 18:57:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 40545 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1818967wrt; Sun, 8 Jan 2023 11:08:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXsOGTKY3X0QdwYgO02JcCU/XmHGJN6f/NaXrF9ib6GjbRr/tZpvRw7D6eeAC2mJxskMo50n X-Received: by 2002:a05:6a20:1e5a:b0:9d:efbf:48d7 with SMTP id cy26-20020a056a201e5a00b0009defbf48d7mr67942035pzb.27.1673204928746; Sun, 08 Jan 2023 11:08:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204928; cv=none; d=google.com; s=arc-20160816; b=QFc5Z23PIEMHauVmRDW/ZhvzlQZgxwJOj3NSwuV6Hv+byra93sL8YDjfbLgY3ZS6lf PONpq67JFFIzooBoyD0zh+PEyy77J+J+1l5flGDX6I6eJ1jFz55ImXOZe18m3u91GEkY ibQ6BvHdaojYpzGugA5wXD7HgLbWWbs9hH+hN+Xz2jRZ0ShPaYcGW+Mx8zN9Hrat2l7x YoXWM5bldPuSFMo9MVAZk/xQBMnTg632hFeqNq9OXMGTzH9nzbo5zjGx1FEXyWoEw4Fp TMsTPy4nawvwUHmDfg1bcuJxrAmBtLHwtXq+NXm1SyhyYlDV5t+870Pifsola3NZbJnV 8ejA== 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=8vWQjTzm22O7iAga3cSFZ8jnabS+zthzUpWQ5codcZA=; b=Ol5Z2ik7pNGrRluDi89jE0bzDnnbsFy/YG1f+FSg+IdyzxBOraLhm08D3oiS8XOvh2 WnZjpiFy4X/Mwp2XkiIHLhI/aYOjKDVpbYE16w0Ad5fKde6ldShJIXNOhXVc8S5Xm8aI b1xBdCq9SKZlUrApOy996UQlCNcrgkXGxTtnTD4+dEHLC4Vvs57lBVukkWo4n5DGZuXr whSWErqYfg0BI1DsWu3rAjHOO71qP+l8ckDBngQqPPqgj2z//ND/99ADFU/Y4wsyW5Sr Vtuna9epZBGih00DPXVu6hS9PHkEYiB9Wgnd7dkDgDg1wUw0ED6tC9vBFYj27odlIjRt xStA== 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 i1-20020a636d01000000b004776765cf3csi7994373pgc.605.2023.01.08.11.08.36; Sun, 08 Jan 2023 11:08:48 -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 S236719AbjAHS67 (ORCPT + 99 others); Sun, 8 Jan 2023 13:58:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236284AbjAHS6I (ORCPT ); Sun, 8 Jan 2023 13:58:08 -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 F3442E02E for ; Sun, 8 Jan 2023 10:58:06 -0800 (PST) Received: from dslb-188-096-147-053.188.096.pools.vodafone-ip.de ([188.96.147.53] 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 1pEarp-0003b8-Ep; Sun, 08 Jan 2023 19:58:01 +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 13/13] staging: r8188eu: xmit_priv's vcs_setting is not used Date: Sun, 8 Jan 2023 19:57:38 +0100 Message-Id: <20230108185738.597105-14-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108185738.597105-1-martin@kaiser.cx> References: <20230108185738.597105-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?1754482531655950467?= X-GMAIL-MSGID: =?utf-8?q?1754482531655950467?= vcs_setting in struct xmit_priv is not used any more. We can remove it. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/rtw_xmit.h | 1 - drivers/staging/r8188eu/os_dep/os_intfs.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index abac0103b53a..cc32167fb4dc 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -267,7 +267,6 @@ struct xmit_priv { struct __queue free_xmit_queue; uint frag_len; struct adapter *adapter; - u8 vcs_setting; u64 tx_bytes; u64 tx_pkts; u64 tx_drop; diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c index f022f6b1cf3e..cfc24420e70c 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -392,7 +392,6 @@ static void rtw_init_default_value(struct adapter *padapter) struct security_priv *psecuritypriv = &padapter->securitypriv; /* xmit_priv */ - pxmitpriv->vcs_setting = pregistrypriv->vrtl_carrier_sense; pxmitpriv->frag_len = pregistrypriv->frag_thresh; /* mlme_priv */