mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: use usleep_range() instead of msleep()
@ 2026-08-22 20:54 Luka Miletic
  2026-09-01  9:48 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Luka Miletic @ 2026-08-22 20:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Luka Miletic, Dang Vu Duc Hien, open list:STAGING SUBSYSTEM, open list

Use usleep_range() instead of msleep() to fix checkpatch warnings.
Verified both loops exit on their own condition, independent of
sleep duration, so this only changes timing precision, not behavior.

Signed-off-by: Luka Miletic <mileticluka2001@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index c15056ee2..8b793680f 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -986,7 +986,7 @@ void rtw_dev_unload(struct adapter *padapter)
 			if (cnt > 5)
 				break;
 			cnt++;
-			msleep(10);
+			usleep_range(10000, 20000);
 		}
 
 		/* check the status of IPS */
@@ -1086,7 +1086,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->driver_stopped) || (padapter->bSurpriseRemoved))
 		return;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: rtl8723bs: use usleep_range() instead of msleep()
  2026-08-22 20:54 [PATCH] staging: rtl8723bs: use usleep_range() instead of msleep() Luka Miletic
@ 2026-09-01  9:48 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2026-09-01  9:48 UTC (permalink / raw)
  To: Luka Miletic; +Cc: Dang Vu Duc Hien, open list:STAGING SUBSYSTEM, open list

On Sat, Aug 22, 2026 at 11:54:26PM +0300, Luka Miletic wrote:
> Use usleep_range() instead of msleep() to fix checkpatch warnings.
> Verified both loops exit on their own condition, independent of
> sleep duration, so this only changes timing precision, not behavior.
> 
> Signed-off-by: Luka Miletic <mileticluka2001@gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> index c15056ee2..8b793680f 100644
> --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> @@ -986,7 +986,7 @@ void rtw_dev_unload(struct adapter *padapter)
>  			if (cnt > 5)
>  				break;
>  			cnt++;
> -			msleep(10);
> +			usleep_range(10000, 20000);

Please see the mailing list archives for why we can't take this change.

sorry,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-01  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-22 20:54 [PATCH] staging: rtl8723bs: use usleep_range() instead of msleep() Luka Miletic
2026-09-01  9:48 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®