diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-04-14 21:08:47 +0000 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-04-22 17:06:50 +0200 |
commit | b97f44c9b658d52e0139c947ea5519e51ba38d81 (patch) | |
tree | ef86d61eb124b2f5cf10bac96557608282c7f7f5 | |
parent | c320642e1ced3b81592610e374894fea995f475b (diff) | |
download | op-kernel-dev-b97f44c9b658d52e0139c947ea5519e51ba38d81.zip op-kernel-dev-b97f44c9b658d52e0139c947ea5519e51ba38d81.tar.gz |
hrtimer: Make use of timerqueue_add/del return values
Use the return value instead of reevaluating the information.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/20150414203501.658152945@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | kernel/time/hrtimer.c | 6 |
1 files 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) { |