Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp697210imm; Wed, 10 Oct 2018 02:52:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV611HN9Sia7TJcrKIT0U6+xyCVHhkyJn5vB0gw1whLQ2wlFTnFWh+0emcjmAozfLG8GPlX60 X-Received: by 2002:a62:6b0a:: with SMTP id g10-v6mr9403483pfc.174.1539165156556; Wed, 10 Oct 2018 02:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539165156; cv=none; d=google.com; s=arc-20160816; b=wIoEawTTBWna8JOofW+q/s9148aCr6ijewIYHKYieoLkqI/7ndEthZDnhT64fGz5Lz iPfaHQxglftsvZjWf3Q8i9Q+zOhMkp8tMOEoaTVxSLxnHZJLqr9fmzVzwI4N8KE42CQr 8HTZ8/rLKkcxnYLDPWjA2+SRrbqV0IjuuVZlCPIhRCKAPZ3pJ4G1fqt7ZkLsQIdSNQCN arBT2tsK3SCy/MRvxgscKnq01LPNO9qZ9ONdJNsph/XJMwe51gb1kFTadyBzRaYLQ2O0 a7X88qalDE9q9DdSZrhZT6i0cb1KPbyPENB0vOfk0Lkd5jHQXFVJTEMgtWiuzYCV2Ros QScw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=bCUiNrOSKXp7BKEwnYmtLpVKofUZhcyHRaeZ/bT0AhY=; b=1F9tXYoVuU/fQMIeVCieyaljEO4Ei9GXiYn9Vswhg1q115JkUNK2Sf+OKksuSrhUDg uCyq1hg/dKRTDQh5Vgj3l0GMfDyuY8kPhShVXwqyge27eSXfN4gWEHKWGn0kZNdyUJvb y97dI8y0PhtkSDqr1qKnMg/Yr6vptRQIJW9v7VO8Mv78IQoBYa3vPBVq8lhy5NvDWrle /nl/+Ttf8rtoW/8WqNwncXvo3XDVg+vMkq1VQyuN/XusevmgU2qs8VeNyJ3GaOZPMZPh G1817XH54LxmaQ2A+IUC+JwUKwEv/7HNmev/P8qY7GDemRNHtqulDQkRZ93vB0104nMD xGmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2-v6si22063182pgw.310.2018.10.10.02.52.20; Wed, 10 Oct 2018 02:52:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726861AbeJJRNV (ORCPT + 99 others); Wed, 10 Oct 2018 13:13:21 -0400 Received: from terminus.zytor.com ([198.137.202.136]:37079 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbeJJRNV (ORCPT ); Wed, 10 Oct 2018 13:13:21 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w9A9pqX71424069 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 10 Oct 2018 02:51:53 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w9A9pqI11424066; Wed, 10 Oct 2018 02:51:52 -0700 Date: Wed, 10 Oct 2018 02:51:52 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Peng Hao Message-ID: Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, peng.hao2@zte.com.cn, hpa@zytor.com Reply-To: peng.hao2@zte.com.cn, hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org In-Reply-To: <1539099815-2943-1-git-send-email-penghao122@sina.com.cn> References: <1539099815-2943-1-git-send-email-penghao122@sina.com.cn> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] tick/sched : Remove redundant cpu_online() check Git-Commit-ID: d59e0ba19481c0046d2ea2bd0e5344eeaf45aace X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_48_96 autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: d59e0ba19481c0046d2ea2bd0e5344eeaf45aace Gitweb: https://git.kernel.org/tip/d59e0ba19481c0046d2ea2bd0e5344eeaf45aace Author: Peng Hao AuthorDate: Tue, 9 Oct 2018 11:43:35 -0400 Committer: Thomas Gleixner CommitDate: Wed, 10 Oct 2018 11:47:20 +0200 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 --- kernel/time/tick-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 5b33e2f5c0ed..69e673b88474 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 &&