From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 06/10] staging: rtl8192e: Remove unchanged variable RegRfOff
Date: Sat, 1 Oct 2022 11:41:10 +0200 [thread overview]
Message-ID: <fa306d364b43fee7b81f5289309e93bb6fccdba5.1664616227.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1664616227.git.philipp.g.hortmann@gmail.com>
RegRfOff is just once initialized with false and then set to false again.
All evaluations will result in false. Remove resulting dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 7 +------
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 --
4 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 18e4e5d84878..f2cbec6eb08f 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -624,9 +624,6 @@ bool rtl92e_start_adapter(struct net_device *dev)
}
priv->pFirmware->status = FW_STATUS_0_INIT;
- if (priv->RegRfOff)
- priv->rtllib->rf_power_state = rf_off;
-
ulRegRead = rtl92e_readl(dev, CPU_GEN);
if (priv->pFirmware->status == FW_STATUS_0_INIT)
ulRegRead |= CPU_GEN_SYSTEM_RESET;
@@ -756,9 +753,7 @@ bool rtl92e_start_adapter(struct net_device *dev)
rtl92e_writeb(dev, 0x87, 0x0);
- if (priv->RegRfOff) {
- rtl92e_set_rf_state(dev, rf_off, RF_CHANGE_BY_SW);
- } else if (priv->rtllib->rf_off_reason > RF_CHANGE_BY_PS) {
+ if (priv->rtllib->rf_off_reason > RF_CHANGE_BY_PS) {
rtl92e_set_rf_state(dev, rf_off, priv->rtllib->rf_off_reason);
} else if (priv->rtllib->rf_off_reason >= RF_CHANGE_BY_IPS) {
rtl92e_set_rf_state(dev, rf_off, priv->rtllib->rf_off_reason);
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index 1b592258e640..a44dffa76a39 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -1325,7 +1325,6 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
do {
InitilizeCount--;
- priv->RegRfOff = false;
rtstatus = rtl92e_enable_nic(dev);
} while (!rtstatus && (InitilizeCount > 0));
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 3cddc9a86f28..e77a73df9bc5 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -879,7 +879,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->RxCounter = 0;
priv->rtllib->wx_set_enc = 0;
priv->hw_radio_off = false;
- priv->RegRfOff = false;
priv->rtllib->rf_off_reason = 0;
priv->rf_change_in_progress = false;
priv->bHwRfOffAction = 0;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 23dccd6079ea..7d716fa12995 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -472,8 +472,6 @@ struct r8192_priv {
u16 RegChannelPlan;
u16 ChannelPlan;
-
- bool RegRfOff;
u8 bHwRfOffAction;
bool rf_change_in_progress;
--
2.37.3
next prev parent reply other threads:[~2022-10-01 9:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-01 9:40 [PATCH 00/10] staging: rtl8192e: Remove unused and unchanged variables in rtl_ps.c Philipp Hortmann
2022-10-01 9:40 ` [PATCH 01/10] staging: rtl8192e: Remove unchanged variable bFwCtrlLPS Philipp Hortmann
2022-10-01 9:40 ` [PATCH 02/10] staging: rtl8192e: Remove unchanged variable bInactivePs Philipp Hortmann
2022-10-01 9:40 ` [PATCH 03/10] staging: rtl8192e: Remove unused variable bIPSModeBackup Philipp Hortmann
2022-10-01 9:40 ` [PATCH 04/10] staging: rtl8192e: Remove unused variable bInPowerSaveMode Philipp Hortmann
2022-10-01 9:41 ` [PATCH 05/10] staging: rtl8192e: Remove unused variable isRFOff Philipp Hortmann
2022-10-01 9:41 ` Philipp Hortmann [this message]
2022-10-01 9:41 ` [PATCH 07/10] staging: rtl8192e: Remove unchanged variable bDisableNormalResetCheck Philipp Hortmann
2022-10-01 9:41 ` [PATCH 08/10] staging: rtl8192e: Remove unused variable bForcedSilentReset Philipp Hortmann
2022-10-01 9:41 ` [PATCH 09/10] staging: rtl8192e: Remove unused variable ScanDelay Philipp Hortmann
2022-10-01 9:41 ` [PATCH 10/10] staging: rtl8192e: Remove unused variable bDriverIsGoingToUnload Philipp Hortmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa306d364b43fee7b81f5289309e93bb6fccdba5.1664616227.git.philipp.g.hortmann@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®