From: Peng Hao Date: Tue, 9 Oct 2018 15:43:35 +0000 (-0400) Subject: tick/sched : Remove redundant cpu_online() check X-Git-Tag: v5.4-rc1~2377^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d59e0ba19481c0046d2ea2bd0e5344eeaf45aace;p=platform%2Fkernel%2Flinux-rpi.git tick/sched : Remove redundant cpu_online() check 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 Signed-off-by: Thomas Gleixner Cc: fweisbec@gmail.com Link: https://lkml.kernel.org/r/1539099815-2943-1-git-send-email-penghao122@sina.com.cn --- diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 5b33e2f..69e673b 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -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 &&