]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hrtimers: Update the return type of enqueue_hrtimer()
authorRichard Clark <richard.xnu.clark@gmail.com>
Tue, 24 Dec 2024 07:57:03 +0000 (15:57 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 15 Jan 2025 18:49:14 +0000 (19:49 +0100)
The return type should be 'bool' instead of 'int' according to the calling
context in the kernel, and its internal implementation, i.e. :

return timerqueue_add();

which is a bool-return function.

[ tglx: Adjust function arguments ]

Signed-off-by: Richard Clark <richard.xnu.clark@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/Z2ppT7me13dtxm1a@MBC02GN1V4Q05P
kernel/time/hrtimer.c

index 80fe3749d2db1053e7d87d0bfd5e9067273f71f2..b026fd481dceebb740e92ab2758deb4966a3599b 100644 (file)
@@ -1067,11 +1067,10 @@ EXPORT_SYMBOL_GPL(hrtimer_forward);
  * The timer is inserted in expiry order. Insertion into the
  * red black tree is O(log(n)). Must hold the base lock.
  *
- * Returns 1 when the new timer is the leftmost timer in the tree.
+ * Returns true when the new timer is the leftmost timer in the tree.
  */
-static int enqueue_hrtimer(struct hrtimer *timer,
-                          struct hrtimer_clock_base *base,
-                          enum hrtimer_mode mode)
+static bool enqueue_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base,
+                           enum hrtimer_mode mode)
 {
        debug_activate(timer, mode);
        WARN_ON_ONCE(!base->cpu_base->online);