Skip to contentSkip to conversation

staging: rtl8723bs: replace msleep(1)

PATCH In review Kisub Choe 2 participants 4 messages Jun 21, 2025 – Jun 23, 2025 Staging

lore
Share & tools
lore

Kisub Choe

author
#0 lore raw

PATCH 1/1 staging: rtl8723bs: replace msleep(1)

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().

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +3 -2
index 6a2583d0d3eb..82e77cd8d80c 100644
@@ -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);
 	}
 }
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 9 lines · Kisub Choe

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().

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

regards,
dan carpenter

author
#2 lore raw
Quoted 9 lines · Dan Carpenter
Quoted 8 lines · Kisub Choe

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().

Quoted 7 lines
Quoted 1 line

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.

#3 lore raw
Quoted 18 lines · Kisub Choe
Quoted 9 lines · Dan Carpenter
Quoted 8 lines · Kisub Choe

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().

Quoted 7 lines
Quoted 1 line

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

regards,
dan carpenter

Quoted 6 lines

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