summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPing-Ke Shih <pkshih@realtek.com>2024-09-13 03:28:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-13 08:31:56 +0300
commitea0fca507967d2d4354f97f688cabddcf1dc5f9a (patch)
treec7e747173f5d823dcea3ffac49ce868e8d3290a1
parent0b4d1ed30d8ddf0204afd2842a91c2113d997254 (diff)
downloadlinux-ea0fca507967d2d4354f97f688cabddcf1dc5f9a.tar.xz
staging: rtl8723bs: remove unused 'poll_cnt' from rtw_set_rpwm()
The 'poll_cnt' is used to assist in polling hardware state. Current code uses jiffies to determine timeout, so removing this value is safe. Otherwise, clang warns: core/rtw_pwrctrl.c:288:6: warning: variable 'poll_cnt' set but not used [-Wunused-but-set-variable] 288 | u8 poll_cnt = 0; | ^ Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20240913002815.5149-5-pkshih@realtek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8723bs/core/rtw_pwrctrl.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index a95092129748..dbfcbac3d855 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -284,14 +284,12 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
if (rpwm & PS_ACK) {
unsigned long start_time;
u8 cpwm_now;
- u8 poll_cnt = 0;
start_time = jiffies;
/* polling cpwm */
do {
mdelay(1);
- poll_cnt++;
rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_now);
if ((cpwm_orig ^ cpwm_now) & 0x80) {
pwrpriv->cpwm = PS_STATE_S4;