linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: replace msleep(1)
@ 2025-06-21 23:28 Kisub Choe
  2025-06-23 10:54 ` Dan Carpenter
  0 siblings, 1 reply; 4+ messages in thread
From: Kisub Choe @ 2025-06-21 23:28 UTC (permalink / raw)
  To: gregkh, philipp.g.hortmann, dan.carpenter
  Cc: linux-staging, linux-kernel, kisub.choe.0x1

changed msleep to usleep_range to

Adhere to Linux kernel coding style.
Reported by checkpatch:

WARNING: msleep < 20ms can sleep for up to 20ms;
see function description of msleep().

Signed-off-by: Kisub Choe <kisub.choe.0x1@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 6a2583d0d3eb..82e77cd8d80c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -7,6 +7,7 @@
 #include <drv_types.h>
 #include <hal_data.h>
 #include <linux/jiffies.h>
+#include <linux/delay.h>
 
 void _ips_enter(struct adapter *padapter)
 {
@@ -424,7 +425,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
 			err = -1;
 			break;
 		}
-		msleep(1);
+		usleep_range(900, 1000);
 	}
 
 	return err;
@@ -581,7 +582,7 @@ void LPS_Leave_check(struct adapter *padapter)
 		if (jiffies_to_msecs(jiffies - start_time) > 100)
 			break;
 
-		msleep(1);
+		usleep_range(900, 1000);
 	}
 }
 
-- 
2.34.1


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

* Re: [PATCH] staging: rtl8723bs: replace msleep(1)
  2025-06-21 23:28 [PATCH] staging: rtl8723bs: replace msleep(1) Kisub Choe
@ 2025-06-23 10:54 ` Dan Carpenter
  2025-06-23 14:35   ` Kisub Choe
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2025-06-23 10:54 UTC (permalink / raw)
  To: Kisub Choe; +Cc: gregkh, philipp.g.hortmann, linux-staging, linux-kernel

On Sun, Jun 22, 2025 at 08:28:16AM +0900, Kisub Choe wrote:
> changed msleep to usleep_range to
> 
> Adhere to Linux kernel coding style.
> Reported by checkpatch:
> 
> WARNING: msleep < 20ms can sleep for up to 20ms;
> see function description of msleep().
> 
> Signed-off-by: Kisub Choe <kisub.choe.0x1@gmail.com>

This type of change needs to be tested before it can be merged.

regards,
dan carpenter


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

* Re: [PATCH] staging: rtl8723bs: replace msleep(1)
  2025-06-23 10:54 ` Dan Carpenter
@ 2025-06-23 14:35   ` Kisub Choe
  2025-06-23 15:16     ` Dan Carpenter
  0 siblings, 1 reply; 4+ messages in thread
From: Kisub Choe @ 2025-06-23 14:35 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Kisub Choe, gregkh, philipp.g.hortmann, linux-staging,
	linux-kernel

On Mon, Jun 23, 2025 at 01:54:01PM +0300, Dan Carpenter wrote:
> On Sun, Jun 22, 2025 at 08:28:16AM +0900, Kisub Choe wrote:
> > changed msleep to usleep_range to
> > 
> > Adhere to Linux kernel coding style.
> > Reported by checkpatch:
> > 
> > WARNING: msleep < 20ms can sleep for up to 20ms;
> > see function description of msleep().
> > 
> > Signed-off-by: Kisub Choe <kisub.choe.0x1@gmail.com>
> 
> This type of change needs to be tested before it can be merged.
> 
> regards,
> dan carpenter
> 

Thank you for feedback.
I understand that this type of change should be tested due to its impact
on time-sensitive behavior.
However, I currently don't have access to any device that uses this
driver.
Please let me know how you'd suggest proceeding in this case.

Regards,
Kisub Choe.

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

* Re: [PATCH] staging: rtl8723bs: replace msleep(1)
  2025-06-23 14:35   ` Kisub Choe
@ 2025-06-23 15:16     ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2025-06-23 15:16 UTC (permalink / raw)
  To: Kisub Choe; +Cc: gregkh, philipp.g.hortmann, linux-staging, linux-kernel

On Mon, Jun 23, 2025 at 11:35:27PM +0900, Kisub Choe wrote:
> On Mon, Jun 23, 2025 at 01:54:01PM +0300, Dan Carpenter wrote:
> > On Sun, Jun 22, 2025 at 08:28:16AM +0900, Kisub Choe wrote:
> > > changed msleep to usleep_range to
> > > 
> > > Adhere to Linux kernel coding style.
> > > Reported by checkpatch:
> > > 
> > > WARNING: msleep < 20ms can sleep for up to 20ms;
> > > see function description of msleep().
> > > 
> > > Signed-off-by: Kisub Choe <kisub.choe.0x1@gmail.com>
> > 
> > This type of change needs to be tested before it can be merged.
> > 
> > regards,
> > dan carpenter
> > 
> 
> Thank you for feedback.
> I understand that this type of change should be tested due to its impact
> on time-sensitive behavior.
> However, I currently don't have access to any device that uses this
> driver.
> Please let me know how you'd suggest proceeding in this case.

Just leave it as-is until someone who has the hardware can test it.

regards,
dan carpenter

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

end of thread, other threads:[~2025-06-23 15:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-21 23:28 [PATCH] staging: rtl8723bs: replace msleep(1) Kisub Choe
2025-06-23 10:54 ` Dan Carpenter
2025-06-23 14:35   ` Kisub Choe
2025-06-23 15:16     ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).