Re: [PATCH] staging: rtl8723bs: Replace msleep with usleep_range
From: Andy Shevchenko
Date: Fri Mar 20 2026 - 03:43:13 EST
On Fri, Mar 20, 2026 at 01:24:37AM +0530, AyushMukkanwar wrote:
> The checkpatch.pl script flagged a warning regarding the use of
> msleep() for less than 20ms. msleep() relies on jiffies and can
> be inaccurate for short durations, leading to inefficient delays.
>
> Replace msleep(10) with usleep_range(10000, 12000) to allow for
> timer coalescing. This gives the kernel scheduler a 2ms window
> to group wakeups, improving overall system power efficiency
> while maintaining the required 10ms minimum delay.
The new API is fsleep().
--
With Best Regards,
Andy Shevchenko