Use the return value instead of reevaluating the information.

Signed-off-by: Thomas Gleixner <t...@linutronix.de>
---
 kernel/time/hrtimer.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Index: tip/kernel/time/hrtimer.c
===================================================================
--- tip.orig/kernel/time/hrtimer.c
+++ tip/kernel/time/hrtimer.c
@@ -834,7 +834,6 @@ static int enqueue_hrtimer(struct hrtime
 {
        debug_activate(timer);
 
-       timerqueue_add(&base->active, &timer->node);
        base->cpu_base->active_bases |= 1 << base->index;
 
        /*
@@ -843,7 +842,7 @@ static int enqueue_hrtimer(struct hrtime
         */
        timer->state |= HRTIMER_STATE_ENQUEUED;
 
-       return (&timer->node == base->active.next);
+       return timerqueue_add(&base->active, &timer->node);
 }
 
 /*
@@ -867,8 +866,7 @@ static void __remove_hrtimer(struct hrti
                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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to