[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-b97f44c9b658d52e0139c947ea5519e51ba38d81@git.kernel.org>
Date: Wed, 22 Apr 2015 12:08:26 -0700
From: tip-bot for Thomas Gleixner <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: fweisbec@...il.com, hpa@...or.com, preeti@...ux.vnet.ibm.com,
peterz@...radead.org, viresh.kumar@...aro.org,
linux-kernel@...r.kernel.org, tglx@...utronix.de,
mtosatti@...hat.com, mingo@...nel.org
Subject: [tip:timers/core] hrtimer: Make use of timerqueue_add/
del return values
Commit-ID: b97f44c9b658d52e0139c947ea5519e51ba38d81
Gitweb: http://git.kernel.org/tip/b97f44c9b658d52e0139c947ea5519e51ba38d81
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Tue, 14 Apr 2015 21:08:47 +0000
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 22 Apr 2015 17:06:50 +0200
hrtimer: Make use of timerqueue_add/del return values
Use the return value instead of reevaluating the information.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Peter Zijlstra <peterz@...radead.org>
Cc: Preeti U Murthy <preeti@...ux.vnet.ibm.com>
Cc: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Marcelo Tosatti <mtosatti@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Link: http://lkml.kernel.org/r/20150414203501.658152945@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
kernel/time/hrtimer.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index fce0ccf..0cd1e0b 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -842,7 +842,6 @@ static int enqueue_hrtimer(struct hrtimer *timer,
{
debug_activate(timer);
- timerqueue_add(&base->active, &timer->node);
base->cpu_base->active_bases |= 1 << base->index;
/*
@@ -851,7 +850,7 @@ static int enqueue_hrtimer(struct hrtimer *timer,
*/
timer->state |= HRTIMER_STATE_ENQUEUED;
- return (&timer->node == base->active.next);
+ return timerqueue_add(&base->active, &timer->node);
}
/*
@@ -875,8 +874,7 @@ static void __remove_hrtimer(struct hrtimer *timer,
goto out;
next_timer = timerqueue_getnext(&base->active);
- timerqueue_del(&base->active, &timer->node);
- if (!timerqueue_getnext(&base->active))
+ if (!timerqueue_del(&base->active, &timer->node))
cpu_base->active_bases &= ~(1 << base->index);
if (&timer->node == next_timer) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists