aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeliang Tang <[email protected]>2015-11-15 18:18:40 +0800
committerIngo Molnar <[email protected]>2015-11-23 09:48:17 +0100
commit01783e0d452736d7deff1b920c5eccad67adc428 (patch)
tree95a498910a1f9d1141f2a40b4edd5bde1993f6d7
parent3ea94de15ce9f3a217f6d0a7e9e0f48388902bb7 (diff)
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 <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/a5453fafd735affcf28e53a1d0a3d6965cb5dbb5.1447582547.git.geliangtang@163.com Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--kernel/sched/core.c2
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 = &current->rt;
- return rt_se->run_list.prev == rt_se->run_list.next;
+ return list_is_singular(&rt_se->run_list);
}
/*