tick/sched : Remove redundant cpu_online() check
authorPeng Hao <peng.hao2@zte.com.cn>
Tue, 9 Oct 2018 15:43:35 +0000 (11:43 -0400)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 10 Oct 2018 09:47:20 +0000 (11:47 +0200)
can_stop_idle_tick() checks cpu_online() twice. The first check leaves the
function when the CPU is not online, so the second check it
redundant. Remove it.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: fweisbec@gmail.com
Link: https://lkml.kernel.org/r/1539099815-2943-1-git-send-email-penghao122@sina.com.cn
kernel/time/tick-sched.c

index 5b33e2f5c0ed3d2b158e456c2b6748e39f51b629..69e673b884744bbf01a98e713b98626bee2186bf 100644 (file)
@@ -885,7 +885,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
        if (need_resched())
                return false;
 
-       if (unlikely(local_softirq_pending() && cpu_online(cpu))) {
+       if (unlikely(local_softirq_pending())) {
                static int ratelimit;
 
                if (ratelimit < 10 &&