staging: rtl8723bs: avoid short msleep duration
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
@@ -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
Greg Kroah-Hartman
maintainerQuoted 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.
Signed-off-by Sun Jian <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8723bs/core/rtw_cmd.c +0
-0
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