mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/core: use list_is_singular in sched_can_stop_tick()
@ 2015-11-15 10:18 Geliang Tang
  2015-11-23 16:21 ` [tip:sched/core] sched/core: Use list_is_singular() " tip-bot for Geliang Tang
  0 siblings, 1 reply; 2+ messages in thread
From: Geliang Tang @ 2015-11-15 10:18 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra; +Cc: Geliang Tang, linux-kernel

Use list_is_singular() to check if run_list has only one entry.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 4d568ac..abb7c32 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);
 	}
 
 	/*
-- 
2.5.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-23 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-15 10:18 [PATCH] sched/core: use list_is_singular in sched_can_stop_tick() Geliang Tang
2015-11-23 16:21 ` [tip:sched/core] sched/core: Use list_is_singular() " tip-bot for Geliang Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®