From: Miaohe Lin Date: Tue, 28 Jul 2020 11:17:55 +0000 (+0800) Subject: sched: Remove duplicated tick_nohz_full_enabled() check X-Git-Tag: v5.15~3264^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21a6ee14a8f277766618ef07154432b46528113e;p=platform%2Fkernel%2Flinux-starfive.git sched: Remove duplicated tick_nohz_full_enabled() check In sched_update_tick_dependency() there's two calls that check whether nohz_full is enabled: tick_nohz_full_cpu() does it implicitly, while there's also an explicit call to tick_nohz_full_enabled(). Remove the duplicated, open coded check. [ mingo: Amended the changelog. ] Signed-off-by: Miaohe Lin Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/1595935075-14223-1-git-send-email-linmiaohe@huawei.com --- diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 9f33c77..296efd30 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1961,12 +1961,7 @@ extern int __init sched_tick_offload_init(void); */ static inline void sched_update_tick_dependency(struct rq *rq) { - int cpu; - - if (!tick_nohz_full_enabled()) - return; - - cpu = cpu_of(rq); + int cpu = cpu_of(rq); if (!tick_nohz_full_cpu(cpu)) return;