Re: [PATCH] staging: rtl8723bs: replace msleep() with fsleep() in rtw_cmd.c

From: Ethan Tidmore

Date: Thu Feb 26 2026 - 21:04:09 EST


On Wed Feb 25, 2026 at 7:05 PM CST, Jose A. Perez de Azpillaga wrote:
> Replace msleep() with fsleep() in rtw_cmd.c to improve delay
> precision and follow modern kernel practices.
>
> Specifically, this fixes a checkpatch warning for the 10ms delay
> in _rtw_free_evt_priv() and updates the 100ms polling loop in
> rtw_chk_hi_queue_hdl() for consistency.
>
> Signed-off-by: Jose A. Perez de Azpillaga <azpijr@xxxxxxxxx>
> ---

...

> _cancel_workitem_sync(&pevtpriv->c2h_wk);
> while (pevtpriv->c2h_wk_alive)
> - msleep(10);
> + fsleep(10 * 1000);

It's better to use USEC_PER_MSEC instead of 1000 to avoid magic numbers.

...

> while (!empty && jiffies_to_msecs(jiffies - start) < g_wait_hiq_empty) {
> - msleep(100);
> + fsleep(100 * 1000);

Ditto.

Thanks,

ET