summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorAnna-Maria Behnsen <anna-maria@linutronix.de>2024-10-14 10:22:26 +0200
committerThomas Gleixner <tglx@linutronix.de>2024-10-16 00:36:47 +0200
commit6279abf16a014474fba3de2e28b6ede871141cde (patch)
tree9cc95447cc3d512915552419e3de1864843b63b1 /scripts/checkpatch.pl
parentmm/damon/core: Use generic upper bound recommondation for usleep_range() (diff)
downloadlinux-6279abf16a014474fba3de2e28b6ede871141cde.tar.xz
linux-6279abf16a014474fba3de2e28b6ede871141cde.zip
timers: Add a warning to usleep_range_state() for wrong order of arguments
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 mis-usage by resetting the delta to 0. Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/all/20241014-devel-anna-maria-b4-timers-flseep-v3-9-dc8b907cb62f@linutronix.de
Diffstat (limited to 'scripts/checkpatch.pl')
0 files changed, 0 insertions, 0 deletions