Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH 3/3] staging: rtl8723bs: use usleep_range() instead of msleep(10)
@ 2026-08-09 16:39 Raushan Kumar
  0 siblings, 0 replies; only message in thread
From: Raushan Kumar @ 2026-08-09 16:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, Raushan Kumar

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 <mitramaurya80@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index a9382dc1294b..1455b4a5b9e7 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -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);
-- 
2.55.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-09 16:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-09 16:39 [PATCH 3/3] staging: rtl8723bs: use usleep_range() instead of msleep(10) Raushan Kumar

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