Re: [PATCH v3] checkpatch: mention fsleep() in MSLEEP and USLEEP_RANGE warnings

From: Andy Shevchenko

Date: Wed Feb 25 2026 - 11:40:23 EST


On Wed, Feb 25, 2026 at 10:21:35AM -0500, Neel Bullywon wrote:
> Expand the USLEEP_RANGE check to recommend fsleep() as the preferred
> option over both usleep_range() and udelay(), and expand the MSLEEP
> warning to suggest considering fsleep() for short msleep calls.
> fsleep() autoselects the best sleep mechanism based on duration,
> making it the preferred choice for sleep operations.

Good enough to me.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

...

> - "usleep_range is preferred over udelay; see function description of usleep_range() and udelay().\n" . $herecurr);
> + "fsleep() is preferred over others; usleep_range() is preferred over udelay(); see function descriptions of usleep_range(), udelay(), and fsleep().\n" . $herecurr);

^^^ just for the context for the below.

...

> - "msleep < 20ms can sleep for up to 20ms; see function description of msleep().\n" . $herecurr);
> + "msleep < 20ms can sleep for up to 20ms; consider using fsleep(); see function description of msleep() and fsleep().\n" . $herecurr);

I think 'descriptions' should be plural here as well.

--
With Best Regards,
Andy Shevchenko