Skip to contentSkip to conversation

drivers: staging: rtl8723bs: Replace msleep() with usleep_range().

PATCH In review Aymen Khalfa 3 participants 4 messages Oct 16, 2024 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: staging: rtl8723bs: Replace msleep() with usleep_range().

-Fix checkpatch.pl warning by replacing msleep() with usleep_range() as recommended in the documentation.

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +2 -2
index dbfcbac3d855..26e125f556e9 100644
@@ -429,7 +429,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
 			err = -1;
 			break;
 		}
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 
 	return err;
@@ -591,7 +591,7 @@ void LPS_Leave_check(struct adapter *padapter)
 		if (jiffies_to_msecs(jiffies - start_time) > 100)
 			break;
 
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 }
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 4 lines · Aymen Khalfa

-Fix checkpatch.pl warning by replacing msleep() with usleep_range() as recommended in the documentation.

Thanks, patch looks good to me:

Regards,

Hans

Quoted 26 lines
---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +2 -2
index dbfcbac3d855..26e125f556e9 100644
@@ -429,7 +429,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
 			err = -1;
 			break;
 		}
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 
 	return err;
@@ -591,7 +591,7 @@ void LPS_Leave_check(struct adapter *padapter)
 		if (jiffies_to_msecs(jiffies - start_time) > 100)
 			break;
 
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 }
 
maintainer
#2 lore raw
In reply to Aymen Khalfa
Quoted 34 lines · Aymen Khalfa

-Fix checkpatch.pl warning by replacing msleep() with usleep_range() as recommended in the documentation.

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +2 -2
index dbfcbac3d855..26e125f556e9 100644
@@ -429,7 +429,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
 			err = -1;
 			break;
 		}
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 
 	return err;
@@ -591,7 +591,7 @@ void LPS_Leave_check(struct adapter *padapter)
 		if (jiffies_to_msecs(jiffies - start_time) > 100)
 			break;
 
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 }
 
Signature · 1 line
2.34.1

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.

You are receiving this message because of the following common error(s) as indicated below:

- You sent a patch that has been sent multiple times in the past, and is identical to ones that have been rejected. Please always look at the mailing list traffic to determine if you are duplicating other people's work.

If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.

thanks,

greg k-h's patch email bot

maintainer
#3 lore raw
In reply to Aymen Khalfa
Quoted 2 lines · Aymen Khalfa

-Fix checkpatch.pl warning by replacing msleep() with usleep_range() as recommended in the documentation.

Here's a link fixing checkpatch to not give bad advice like this:

	https://lore.kernel.org/r/20241014-devel-anna-maria-b4-timers-flseep-v3-16-dc8b907cb62f@linutronix.de

so that will be changed soon so that people don't keep trying to "fix up" this driver that is not broken...

thanks,

greg k-h