Commit ea0fca50 authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Greg Kroah-Hartman

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: default avatarPing-Ke Shih <pkshih@realtek.com>
Tested-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240913002815.5149-5-pkshih@realtek.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0b4d1ed3
...@@ -284,14 +284,12 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) ...@@ -284,14 +284,12 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
if (rpwm & PS_ACK) { if (rpwm & PS_ACK) {
unsigned long start_time; unsigned long start_time;
u8 cpwm_now; u8 cpwm_now;
u8 poll_cnt = 0;
start_time = jiffies; start_time = jiffies;
/* polling cpwm */ /* polling cpwm */
do { do {
mdelay(1); mdelay(1);
poll_cnt++;
rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_now); rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_now);
if ((cpwm_orig ^ cpwm_now) & 0x80) { if ((cpwm_orig ^ cpwm_now) & 0x80) {
pwrpriv->cpwm = PS_STATE_S4; pwrpriv->cpwm = PS_STATE_S4;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment