staging: rtl8723bs: use usleep_range() instead of msleep(10)
PATCH 3/3 staging: rtl8723bs: use usleep_range() instead of msleep(10)
msleep() can sleep for up to 20ms for requested durations under 20ms, due to jiffies timer granularity, as noted in the kernel's own delay.h documentation. Replace msleep(10) with usleep_range() in chk_bmc_sleepq_hdl() for more accurate short-duration sleeps, as flagged by checkpatch.pl.
Signed-off-by Raushan Kumar <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +1 -1
@@ -5714,7 +5714,7 @@ u8 chk_bmc_sleepq_hdl(struct adapter *padapter, unsigned char *pbuf)return H2C_SUCCESS ;if ((pstapriv->tim_bitmap &BIT (0 )) && (psta_bmc->sleepq_len >0 )) { -msleep (10 );/* 10ms, ATIM(HIQ) Windows */ +usleep_range (10000 ,20000 );/* 10ms, ATIM(HIQ) Windows */ /* spin_lock_bh(&psta_bmc->sleep_q.lock); */ spin_lock_bh (&pxmitpriv->lock);
Signature · 1 line
2.55.0