From: Geliang Tang Date: Sun, 15 Nov 2015 10:18:40 +0000 (+0800) Subject: sched/core: Use list_is_singular() in sched_can_stop_tick() X-Git-Tag: v4.14-rc1~4088^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01783e0d452736d7deff1b920c5eccad67adc428;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a5453fafd735affcf28e53a1d0a3d6965cb5dbb5.1447582547.git.geliangtang@163.com Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 1b7cb5e..5b420d2 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); } /*