Skip to contentSkip to conversation

staging: rtl8723bs: avoid short msleep duration

PATCH In review Sun Jian 2 participants 2 messages Dec 28, 2025 Staging

lore
Share & tools
lore

Sun Jian

author
#0 lore raw

PATCH 1/1 staging: rtl8723bs: avoid short msleep duration

msleep() is documented to sleep for at least the specified number of milliseconds, but small values may result in a longer delay due to scheduler granularity.

Replace msleep(10) with msleep(20) to match the effective sleep duration and silence checkpatch warning.

No functional change intended.

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +1 -1
index ef2d92b5588a..0edf9ecc4bed 100644
@@ -215,7 +215,7 @@ void _rtw_free_evt_priv(struct	evt_priv *pevtpriv)
 {
 	_cancel_workitem_sync(&pevtpriv->c2h_wk);
 	while (pevtpriv->c2h_wk_alive)
-		msleep(10);
+		msleep(20);
 
 	while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) {
 		void *c2h = rtw_cbuf_pop(pevtpriv->c2h_queue);
Signature · 1 line
2.43.0
#1 lore raw
Quoted 19 lines · Sun Jian

msleep() is documented to sleep for at least the specified number of milliseconds, but small values may result in a longer delay due to scheduler granularity.

Replace msleep(10) with msleep(20) to match the effective sleep duration and silence checkpatch warning.

No functional change intended.

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -0
index ef2d92b5588a..0edf9ecc4bed 100644

drivers/staging/rtl8723bs/core/rtw_cmd.c void _rtw_free_evt_priv(struct evt_priv *pevtpriv) · line 218

Quoted 5 lines
drivers/staging/rtl8723bs/core/rtw_cmd.c +1 -1
@@ -215,7 +215,7 @@ void _rtw_free_evt_priv(struct	evt_priv *pevtpriv)
 {
 	_cancel_workitem_sync(&pevtpriv->c2h_wk);
 	while (pevtpriv->c2h_wk_alive)
-		msleep(10);
+		msleep(20);

That is very arbritrary, are you sure this is ok? Why 20?

Just doing this for checkpatch without being able to test and know it works properly on real hardware is not a good idea.

thanks,

greg k-h