Re: [PATCH v3 09/16] timers: Add a warning to usleep_range_state() for wrong order of arguments
From: Frederic Weisbecker
Date: Tue Oct 15 2024 - 09:54:59 EST
Le Mon, Oct 14, 2024 at 10:22:26AM +0200, Anna-Maria Behnsen a écrit :
> There is a warning in checkpatch script that triggers, when min and max
> arguments of usleep_range_state() are in reverse order. This check does
> only cover callsites which uses constants. Add this check into the code as
> a WARN_ON_ONCE() to also cover callsites not using constants and fix the
> miss usage by resetting the delta to 0.
>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@xxxxxxxxxxxxx>
Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>