mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] hrtimers: Update the return type of enqueue_hrtimer()
@ 2024-12-24  7:57 Richard Clark
  2025-01-15 18:54 ` [tip: timers/core] " tip-bot2 for Richard Clark
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Clark @ 2024-12-24  7:57 UTC (permalink / raw)
  To: tglx; +Cc: anna-maria, frederic, linux-kernel, linux-arm-kernel

The return type should be 'bool' instead of 'int' according to the calling context
in the kernel, and its internal implementaion - return timerqueue_add() which
is a bool-return function.

Signed-off-by: Richard Clark <richard.xnu.clark@gmail.com>
---
 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 80fe3749d2db..bda3ffbd444e 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1067,9 +1067,9 @@ 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,
+static bool enqueue_hrtimer(struct hrtimer *timer,
 			   struct hrtimer_clock_base *base,
 			   enum hrtimer_mode mode)
 {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip: timers/core] hrtimers: Update the return type of enqueue_hrtimer()
  2024-12-24  7:57 [PATCH] hrtimers: Update the return type of enqueue_hrtimer() Richard Clark
@ 2025-01-15 18:54 ` tip-bot2 for Richard Clark
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Richard Clark @ 2025-01-15 18:54 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Richard Clark, Thomas Gleixner, x86, linux-kernel

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     da7100d3bf7d6f5c49ef493ea963766898e9b069
Gitweb:        https://git.kernel.org/tip/da7100d3bf7d6f5c49ef493ea963766898e9b069
Author:        Richard Clark <richard.xnu.clark@gmail.com>
AuthorDate:    Tue, 24 Dec 2024 15:57:03 +08:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 15 Jan 2025 19:49:14 +01:00

hrtimers: Update the return type of enqueue_hrtimer()

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

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 80fe374..b026fd4 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-15 18:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-24  7:57 [PATCH] hrtimers: Update the return type of enqueue_hrtimer() Richard Clark
2025-01-15 18:54 ` [tip: timers/core] " tip-bot2 for Richard Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®