Re: [PATCH v2] checkpatch: mention fsleep() in MSLEEP and USLEEP_RANGE warnings
From: Andy Shevchenko
Date: Sun Feb 22 2026 - 06:11:28 EST
On Fri, Feb 20, 2026 at 06:05:55PM -0500, Neel Bullywon wrote:
> Expand the MSLEEP warning to also reference fsleep() alongside
> msleep(), and expand the USLEEP_RANGE check to reference fsleep()
> alongside usleep_range() and udelay(). fsleep() autoselects the
> best sleep mechanism based on duration, making it a useful
> alternative for developers to consider.
...
> - "usleep_range is preferred over udelay; see function description of usleep_range() and udelay().\n" . $herecurr);
> + "usleep_range is preferred over udelay; see function description of usleep_range(), udelay(), and fsleep().\n" . $herecurr);
"fsleep() is preferred over others; usleep_range() is preferred over udelay(); see function descriptions of usleep_range(), udelay(), and fsleep().\n"
...
> - "msleep < 20ms can sleep for up to 20ms; see function description of msleep().\n" . $herecurr);
> + "msleep < 20ms can sleep for up to 20ms; see function description of msleep() and fsleep().\n" . $herecurr);
"msleep < 20ms can sleep for up to 20ms; consider using fsleep(); see function description of msleep() and fsleep().\n"
--
With Best Regards,
Andy Shevchenko