Skip to content

Commit ea0fca5

Browse files
Ping-Ke Shihgregkh
authored andcommitted
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>
1 parent 0b4d1ed commit ea0fca5

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,12 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
284284
if (rpwm & PS_ACK) {
285285
unsigned long start_time;
286286
u8 cpwm_now;
287-
u8 poll_cnt = 0;
288287

289288
start_time = jiffies;
290289

291290
/* polling cpwm */
292291
do {
293292
mdelay(1);
294-
poll_cnt++;
295293
rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_now);
296294
if ((cpwm_orig ^ cpwm_now) & 0x80) {
297295
pwrpriv->cpwm = PS_STATE_S4;

0 commit comments

Comments
 (0)