Clean-up try_to_wake_up().
Get rid of the 'new_cpu' variable in try_to_wake_up() [ that's, one
#ifdef section less ]. Also remove a few redundant blank lines.
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
unsigned long flags;
long old_state;
struct rq *rq;
-#ifdef CONFIG_SMP
- int new_cpu;
-#endif
rq = task_rq_lock(p, &flags);
old_state = p->state;
if (unlikely(task_running(rq, p)))
goto out_activate;
- new_cpu = p->sched_class->select_task_rq(p, sync);
- if (new_cpu != cpu) {
- set_task_cpu(p, new_cpu);
+ cpu = p->sched_class->select_task_rq(p, sync);
+ if (cpu != orig_cpu) {
+ set_task_cpu(p, cpu);
task_rq_unlock(rq, &flags);
/* might preempt at this point */
rq = task_rq_lock(p, &flags);
}
}
}
-
#endif
-
out_activate:
#endif /* CONFIG_SMP */
schedstat_inc(p, se.nr_wakeups);