]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hrtimer: Fix the bogus return type of __hrtimer_start_range_ns()
authorThomas Gleixner <tglx@kernel.org>
Wed, 13 May 2026 12:59:29 +0000 (14:59 +0200)
committerThomas Gleixner <tglx@kernel.org>
Wed, 13 May 2026 20:41:12 +0000 (22:41 +0200)
__hrtimer_start_range_ns() has a bool return type, but returns actually
three different values, which are checked at the call site.

Make the return type int.

Fixes: bd5956166d20 ("hrtimer: Provide hrtimer_start_range_ns_user()")
Reported-by: Dan Carpenter <error27@gmail.com
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
kernel/time/hrtimer.c

index 8a19a61f6feeacb8b0058cd50e97ed2e4fe89d68..638ce623c342f0cfe003a556df062cb62474efc8 100644 (file)
@@ -1358,8 +1358,8 @@ enum {
        HRTIMER_REPROGRAM_FORCE,
 };
 
-static bool __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, u64 delta_ns,
-                                    const enum hrtimer_mode mode, struct hrtimer_clock_base *base)
+static int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, u64 delta_ns,
+                                   const enum hrtimer_mode mode, struct hrtimer_clock_base *base)
 {
        struct hrtimer_cpu_base *this_cpu_base = this_cpu_ptr(&hrtimer_bases);
        bool is_pinned, first, was_first, keep_base = false;