From patchwork Sun Oct 23 17:08:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 8069 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp72624wru; Sun, 23 Oct 2022 10:16:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM76TYyOYp2YwFkH8asNYqwEe6HD+yWRREM+XJ26phz4mKZv31TmT9TiDZPq7A2FvikcAJv1 X-Received: by 2002:a50:d70a:0:b0:460:5db5:368b with SMTP id t10-20020a50d70a000000b004605db5368bmr17415640edi.397.1666545406885; Sun, 23 Oct 2022 10:16:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666545406; cv=none; d=google.com; s=arc-20160816; b=YLD28IzHGCzhaokgT6PHdNFp9ebYRxx6BNA42iWJaJ9Kq6t6En3HscsvdDIfxS9bQF V9VuJe4zi9wAmC96XyyT2ohjP8d/7uj05hbyVGKTa31DLu0VV2Iq2K91nEsEvL26equU lDnhySxd4WO7RGRg//nMI6tpCJy5ExsvxlmvQbld4TvodWVuZyOJ8zBZ0EMVi4imNhwP fqrkR8XMh7c/+ncA1lbxjWYx+eGYkvAIyi8zAv5ykDlcR0rW2dX6uhjYUSEs9efWdEDL 6dMjF7Mqn7y3l4waEAPFs2CLXdcyEuU59oQVstAq7gIYzZrkhFxFhYqYK8qWX/KIekCb TQ4A== 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=/U2dHWwJqu26ze8z9CGbB7v508Yu9MObE4lhGo1gBGY=; b=eYAmzWEZm7Zwf815bIvE9p1DNBWb3EYJ2PS9r9KifxWWmA+Fl3SXclHcLvN2Y24AWf DTiIlIRGDQxXv0fQjUqFQpPrl6ibFagiWhswH98kcoOiI0HjtbzkW9liD6UATtqjuBQY Y1Idib6adE0CF0yToD9HJSKeVL/Y03ky+dlXuiZK6fCzCPueQKOilWYeN7x7zJ58MmqR zve+VMDTB1GMUYqgM23yRaXSZvEindGu2YQ75xbNsA16GZLtV9puzOryNabVrPxSVMFT mIxsuNfbXn7X7FNlRabmZRzhXCkzL6yDeZUkSe7bhiyrONu+Ak5xOKTfvrdS/4fkRcJv G2zg== 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 sc41-20020a1709078a2900b0078ddde15fdcsi28913851ejc.279.2022.10.23.10.16.21; Sun, 23 Oct 2022 10:16:46 -0700 (PDT) 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 S231129AbiJWRIh (ORCPT + 99 others); Sun, 23 Oct 2022 13:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230489AbiJWRI2 (ORCPT ); Sun, 23 Oct 2022 13:08:28 -0400 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 15AD8733D2 for ; Sun, 23 Oct 2022 10:08:25 -0700 (PDT) Received: from ipservice-092-217-070-181.092.217.pools.vodafone-ip.de ([92.217.70.181] 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 1omeSS-0000Rj-4e; Sun, 23 Oct 2022 19:08:20 +0200 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 5/5] staging: r8188eu: bCardDisableWOHSM is write-only Date: Sun, 23 Oct 2022 19:08:08 +0200 Message-Id: <20221023170808.46233-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221023170808.46233-1-martin@kaiser.cx> References: <20221023170808.46233-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?1747499516641527995?= X-GMAIL-MSGID: =?utf-8?q?1747499516641527995?= bCardDisableWOHSM in struct adapter is only written but never read. It can be removed. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/drv_types.h | 1 - drivers/staging/r8188eu/os_dep/os_intfs.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h index 1bd0c8f3a358..8fef5759c36a 100644 --- a/drivers/staging/r8188eu/include/drv_types.h +++ b/drivers/staging/r8188eu/include/drv_types.h @@ -167,7 +167,6 @@ struct adapter { s32 bDriverStopped; s32 bSurpriseRemoved; - s32 bCardDisableWOHSM; u8 hw_init_completed; s8 signal_strength; diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c index 38e324754c8f..970f380bac96 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -620,7 +620,6 @@ static int _netdev_open(struct net_device *pnetdev) if (!padapter->bup) { padapter->bDriverStopped = false; padapter->bSurpriseRemoved = false; - padapter->bCardDisableWOHSM = false; status = rtw_hal_init(padapter); if (status == _FAIL) @@ -686,7 +685,6 @@ static int ips_netdrv_open(struct adapter *padapter) padapter->bDriverStopped = false; padapter->bSurpriseRemoved = false; - padapter->bCardDisableWOHSM = false; status = rtw_hal_init(padapter); if (status == _FAIL) @@ -718,13 +716,11 @@ int rtw_ips_pwr_up(struct adapter *padapter) void rtw_ips_pwr_down(struct adapter *padapter) { - padapter->bCardDisableWOHSM = true; padapter->net_closed = true; rtw_led_control(padapter, LED_CTL_POWER_OFF); rtw_ips_dev_unload(padapter); - padapter->bCardDisableWOHSM = false; } static void rtw_fifo_cleanup(struct adapter *adapter)