lkml.org 
[lkml]   [2015]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 14/39] 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>
---
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) {



\
 
 \ /
  Last update: 2015-04-14 23:41    [W:0.304 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site