[PATCH 04/10] staging: rtl8192e: Remove unused variable bInPowerSaveMode

From: Philipp Hortmann
Date: Sat Oct 01 2022 - 05:41:23 EST


bInPowerSaveMode is just once initialized and changed but never evaluated.
Remove resulting dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 2 --
3 files changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index cbb65cfea83a..db55b9b65192 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -881,7 +881,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->hw_radio_off = false;
priv->RegRfOff = false;
priv->isRFOff = false;
- priv->bInPowerSaveMode = 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 7021f9c435d9..28733dc2038b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -475,7 +475,6 @@ struct r8192_priv {

bool RegRfOff;
bool isRFOff;
- bool bInPowerSaveMode;
u8 bHwRfOffAction;

bool rf_change_in_progress;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
index fba86ef730b5..1ced5bcebdab 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
@@ -122,7 +122,6 @@ void rtl92e_ips_enter(struct net_device *dev)
(priv->rtllib->iw_mode != IW_MODE_MASTER)) {
pPSC->eInactivePowerState = rf_off;
priv->isRFOff = true;
- priv->bInPowerSaveMode = true;
_rtl92e_ps_update_rf_state(dev);
}
}
@@ -138,7 +137,6 @@ void rtl92e_ips_leave(struct net_device *dev)
if (rt_state != rf_on && !pPSC->bSwRfProcessing &&
priv->rtllib->rf_off_reason <= RF_CHANGE_BY_IPS) {
pPSC->eInactivePowerState = rf_on;
- priv->bInPowerSaveMode = false;
_rtl92e_ps_update_rf_state(dev);
}
}
--
2.37.3