[PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_cmd.c

Haroen Tmimi posted 1 patch 2 days, 22 hours ago
drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_cmd.c
Posted by Haroen Tmimi 2 days, 22 hours ago
checkpatch.pl issued a warning about msleep(10) not being at least 20ms.
However, 10ms might not be precise enough.

usleep_range(10000, 11000) is a better choice.
It allows for a little flexibility in scheduling.

Signed-off-by: Haroen Tmimi <tmimiharoen@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index ef2d92b55..97c923015 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -215,7 +215,7 @@ void _rtw_free_evt_priv(struct	evt_priv *pevtpriv)
 {
 	_cancel_workitem_sync(&pevtpriv->c2h_wk);
 	while (pevtpriv->c2h_wk_alive)
-		msleep(10);
+		usleep_range(10000, 11000);
 
 	while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) {
 		void *c2h = rtw_cbuf_pop(pevtpriv->c2h_queue);
-- 
2.52.0
Re: [PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_cmd.c
Posted by Ethan Tidmore 2 days, 15 hours ago
On Wed Feb 4, 2026 at 7:44 AM CST, Haroen Tmimi wrote:
> checkpatch.pl issued a warning about msleep(10) not being at least 20ms.
> However, 10ms might not be precise enough.
>
> usleep_range(10000, 11000) is a better choice.
> It allows for a little flexibility in scheduling.
>
> Signed-off-by: Haroen Tmimi <tmimiharoen@gmail.com>

Looks good to me.

Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com>

ET