public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: change msleep to usleep_range
@ 2026-02-25 13:57 Rodrigo Filipe Faria
  2026-02-25 14:15 ` Greg KH
  2026-02-25 15:55 ` Andy Shevchenko
  0 siblings, 2 replies; 3+ messages in thread
From: Rodrigo Filipe Faria @ 2026-02-25 13:57 UTC (permalink / raw)
  To: gregkh
  Cc: s9430939, architanant5, andriy.shevchenko, ignacio.pena87,
	strnad.jj, bryant.boatright, kees, linux-staging, linux-kernel,
	Rodrigo Filipe Faria

checkpatch.pl gave "WARNING: msleep < 20ms can sleep for up to 20ms".

Kernel documentation says that usleep_range() must be used for
delays of 10us to 20ms.
msleep() is inaccurate with the values used.

Signed-off-by: Rodrigo Filipe Faria <rodrigofaria@student.dei.uc.pt>
---
 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 abb84f8aecbe..f6293f049c75 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -214,7 +214,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.53.0


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

end of thread, other threads:[~2026-02-25 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25 13:57 [PATCH] staging: rtl8723bs: change msleep to usleep_range Rodrigo Filipe Faria
2026-02-25 14:15 ` Greg KH
2026-02-25 15:55 ` Andy Shevchenko

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