[tip: timers/core] hrtimer: Fix the bogus return type of __hrtimer_start_range_ns()

tip-bot2 for Thomas Gleixner posted 1 patch 4 weeks, 1 day ago
kernel/time/hrtimer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[tip: timers/core] hrtimer: Fix the bogus return type of __hrtimer_start_range_ns()
Posted by tip-bot2 for Thomas Gleixner 4 weeks, 1 day ago
The following commit has been merged into the timers/core branch of tip:

Commit-ID:     5d330d652d7a455b2215c38e7b0c6149c6f8225d
Gitweb:        https://git.kernel.org/tip/5d330d652d7a455b2215c38e7b0c6149c6f8225d
Author:        Thomas Gleixner <tglx@kernel.org>
AuthorDate:    Wed, 13 May 2026 14:59:29 +02:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Wed, 13 May 2026 22:41:12 +02:00

hrtimer: Fix the bogus return type of __hrtimer_start_range_ns()

__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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 8a19a61..638ce62 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -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;