Skip to content

Commit

Permalink
sched/core: Use list_is_singular() in sched_can_stop_tick()
Browse files Browse the repository at this point in the history
Use list_is_singular() to check if run_list has only one entry.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/a5453fafd735affcf28e53a1d0a3d6965cb5dbb5.1447582547.git.geliangtang@163.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Geliang Tang authored and Ingo Molnar committed Nov 23, 2015
1 parent 3ea94de commit 01783e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ bool sched_can_stop_tick(void)
if (current->policy == SCHED_RR) {
struct sched_rt_entity *rt_se = &current->rt;

return rt_se->run_list.prev == rt_se->run_list.next;
return list_is_singular(&rt_se->run_list);
}

/*
Expand Down

0 comments on commit 01783e0

Please sign in to comment.