diff options
author | Geliang Tang <geliangtang@163.com> | 2015-11-15 18:18:40 +0800 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-11-23 09:48:17 +0100 |
commit | 01783e0d452736d7deff1b920c5eccad67adc428 (patch) | |
tree | 95a498910a1f9d1141f2a40b4edd5bde1993f6d7 /kernel/sched | |
parent | 3ea94de15ce9f3a217f6d0a7e9e0f48388902bb7 (diff) | |
download | linux-01783e0d452736d7deff1b920c5eccad67adc428.tar.gz linux-01783e0d452736d7deff1b920c5eccad67adc428.tar.bz2 linux-01783e0d452736d7deff1b920c5eccad67adc428.zip |
sched/core: Use list_is_singular() in sched_can_stop_tick()
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>
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 1b7cb5e95816..5b420d29bce3 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -731,7 +731,7 @@ bool sched_can_stop_tick(void) if (current->policy == SCHED_RR) { struct sched_rt_entity *rt_se = ¤t->rt; - return rt_se->run_list.prev == rt_se->run_list.next; + return list_is_singular(&rt_se->run_list); } /* |