[PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_suspend_common

Gustavo Arantes posted 1 patch 1 month ago
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_suspend_common
Posted by Gustavo Arantes 1 month ago
Replace msleep(1) with usleep_range(1000, 2000) in rtw_suspend_common(),
since msleep() for values less than 20ms may not sleep for the intended
duration as documented in Documentation/timers/timers-howto.rst.

Signed-off-by: Gustavo Arantes <dev.gustavoa@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index f2d64b05debb..47b1c791ec8c 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -1091,7 +1091,7 @@ void rtw_suspend_common(struct adapter *padapter)
 	pwrpriv->bInSuspend = true;
 
 	while (pwrpriv->bips_processing)
-		msleep(1);
+		usleep_range(1000, 2000);
 
 	if ((!padapter->bup) || (padapter->bDriverStopped) || (padapter->bSurpriseRemoved))
 		return;
-- 
2.53.0
Re: [PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_suspend_common
Posted by Bryant Boatright 1 month ago
On Sun, Mar 08, 2026 at 07:19:50PM -0300, Gustavo Arantes wrote:

> Replace msleep(1) with usleep_range(1000, 2000) in rtw_suspend_common(),
> since msleep() for values less than 20ms may not sleep for the intended
> duration as documented in Documentation/timers/timers-howto.rst.

This has been addressed in a thread recently and Gred said to drop the patch [1].

Best,

Bryant Boatright

[1] https://lore.kernel.org/linux-staging/20260214173139.49094-1-ofekalm100@gmail.com/
Re: [PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_suspend_common
Posted by Gustavo Oliveira Arantes 1 month ago
On Mon, Mar 9, 2026 at 10:36 AM Bryant Boatright
<bryant.boatright@proton.me> wrote:
> This has been addressed in a thread recently and Gred said to drop the patch [1].
> [1] https://lore.kernel.org/linux-staging/20260214173139.49094-1-ofekalm100@gmail.com/

Thanks for pointing that out. I'll drop both usleep_range patches.

Best regards,
Gustavo.