Skip to content

Commit

Permalink
sched/core: Fix formatting issues in sched_can_stop_tick()
Browse files Browse the repository at this point in the history
sched_can_stop_tick() is using 7 spaces instead of 8 spaces or a 'tab' at the
beginning of few lines. Which doesn't align well with the Coding Guidelines.

Also remove local variable 'rq' as it is used at only one place and we can
directly use this_rq() instead.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: fweisbec@gmail.com
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/afb781733e4a9ffbced5eb9fd25cc0aa5c6ffd7a.1403596966.git.viresh.kumar@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Viresh Kumar authored and Ingo Molnar committed Jul 5, 2014
1 parent a77353e commit 541b826
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,19 +736,15 @@ static inline bool got_nohz_idle_kick(void)
#ifdef CONFIG_NO_HZ_FULL
bool sched_can_stop_tick(void)
{
struct rq *rq;

rq = this_rq();

/*
* More than one running task need preemption.
* nr_running update is assumed to be visible
* after IPI is sent from wakers.
*/
if (rq->nr_running > 1)
return false;
if (this_rq()->nr_running > 1)
return false;

return true;
return true;
}
#endif /* CONFIG_NO_HZ_FULL */

Expand Down

0 comments on commit 541b826

Please sign in to comment.