[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210911141521.24901-4-martin@kaiser.cx>
Date: Sat, 11 Sep 2021 16:15:12 +0200
From: Martin Kaiser <martin@...ser.cx>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Larry Finger <Larry.Finger@...inger.net>,
Phillip Potter <phil@...lpotter.co.uk>,
Michael Straube <straube.linux@...il.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Martin Kaiser <martin@...ser.cx>
Subject: [PATCH 03/12] staging: r8188eu: remove write-only variable cpwm
cpwm in struct pwrctrl_priv is never read. Remove it.
Signed-off-by: Martin Kaiser <martin@...ser.cx>
---
drivers/staging/r8188eu/core/rtw_pwrctrl.c | 5 -----
drivers/staging/r8188eu/include/rtw_pwrctrl.h | 2 --
2 files changed, 7 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
index daae91f82e97..2a0ee3aac700 100644
--- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c
+++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
@@ -204,8 +204,6 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
if ((padapter->bSurpriseRemoved) ||
(!padapter->hw_init_completed)) {
- pwrpriv->cpwm = PS_STATE_S4;
-
return;
}
@@ -217,8 +215,6 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
pwrpriv->rpwm = pslv;
pwrpriv->tog += 0x80;
- pwrpriv->cpwm = pslv;
-
}
static u8 PS_RDY_CHECK(struct adapter *padapter)
@@ -423,7 +419,6 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
pwrctrlpriv->bFwCurrentInPSMode = false;
pwrctrlpriv->rpwm = 0;
- pwrctrlpriv->cpwm = PS_STATE_S4;
pwrctrlpriv->pwr_mode = PS_MODE_ACTIVE;
pwrctrlpriv->smart_ps = padapter->registrypriv.smart_ps;
diff --git a/drivers/staging/r8188eu/include/rtw_pwrctrl.h b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
index 6a0efb010d06..c5804a48072b 100644
--- a/drivers/staging/r8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
@@ -152,8 +152,6 @@ enum { /* for ips_mode */
struct pwrctrl_priv {
struct semaphore lock;
volatile u8 rpwm; /* requested power state for fw */
- volatile u8 cpwm; /* fw current power state. updated when
- * 1. read from HCPWM 2. driver lowers power level */
volatile u8 tog; /* toggling */
volatile u8 cpwm_tog; /* toggling */
--
2.20.1
Powered by blists - more mailing lists