提交 b97f44c9 编写于 作者: T Thomas Gleixner

hrtimer: Make use of timerqueue_add/del return values

Use the return value instead of reevaluating the information.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Acked-by: NPeter 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.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 c320642e
...@@ -842,7 +842,6 @@ static int enqueue_hrtimer(struct hrtimer *timer, ...@@ -842,7 +842,6 @@ static int enqueue_hrtimer(struct hrtimer *timer,
{ {
debug_activate(timer); debug_activate(timer);
timerqueue_add(&base->active, &timer->node);
base->cpu_base->active_bases |= 1 << base->index; base->cpu_base->active_bases |= 1 << base->index;
/* /*
...@@ -851,7 +850,7 @@ static int enqueue_hrtimer(struct hrtimer *timer, ...@@ -851,7 +850,7 @@ static int enqueue_hrtimer(struct hrtimer *timer,
*/ */
timer->state |= HRTIMER_STATE_ENQUEUED; 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, ...@@ -875,8 +874,7 @@ static void __remove_hrtimer(struct hrtimer *timer,
goto out; goto out;
next_timer = timerqueue_getnext(&base->active); next_timer = timerqueue_getnext(&base->active);
timerqueue_del(&base->active, &timer->node); if (!timerqueue_del(&base->active, &timer->node))
if (!timerqueue_getnext(&base->active))
cpu_base->active_bases &= ~(1 << base->index); cpu_base->active_bases &= ~(1 << base->index);
if (&timer->node == next_timer) { if (&timer->node == next_timer) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册