Received: by 10.213.65.68 with SMTP id h4csp201685imn; Thu, 15 Mar 2018 23:40:28 -0700 (PDT) X-Google-Smtp-Source: AG47ELvnQ61zpR4MoYAxgribNmj3U4CJRh0MT4SJO86mdIpxicTVaGNMvjUOG217E113sMUAnm/h X-Received: by 10.99.1.148 with SMTP id 142mr606219pgb.24.1521182427966; Thu, 15 Mar 2018 23:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521182427; cv=none; d=google.com; s=arc-20160816; b=eCknb+WBjXjxNRo3eJlIpj+W2CwARL6nCf6M1MjivQGig5uUJpTZ5R+0bXsux29Z2j t+yGXawk0bttvaryuiC9XFUaP4IYkqPuQyNsrNVachHyeSvu1VYv2X3THYuAhuf+WmE1 NMnRmj1luKjEbqzMg3EqSdryt7dLioxLx4mMvanRJ2ePVwQGwSKdb0n9Anji6GIhPCij Cn3yeyzGH7MzWe/fg+j1cDpNMcLLgCE42c6CN9YQyoFSrlQAKZRKGjMjaxkyugNnXZ50 AR/PA+LD5G+eJxJbkY8YNGxRNqRxm8Z9YCjULvpgLx4fya+J6EXCS1uRLjoS6sQo4S5/ AqKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=85bqsOdS7UaTDzxtvCb+kG8sOmaUdmhxxn59NQzPpuE=; b=UWu5ZAEPl17G1hN8D1BPhalRwpsxXJ4PN1FHMvWKQ9KPOrelzBmgTmjzLo6e8thnzY AuN4WqI5ead4E7j95hSrwGd5kf8PNuZ+RTztCGWP1tDoSEf6FbRSKFnuhiRP4ZXcZK+2 ammyqMd58W68Ajdpy2DzZZADx+CIGMZbuBIm2Z5Qo5TPFerr/TVWJnUIX9YVgGwXF5Id eSb7sm8p0l7oJQVc+0rL85FadYz3rsDbT3cQYKPg3kT0ra7BITI9sp9rjBDx6j5qZTBw uh28LvliXWpdbk6wcnvGGinxWTolcRolS/qBF5Rx1FdzME5C6JKYcCrbaZpxd0XqoPfU WCLg== 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 j84si5092861pfj.177.2018.03.15.23.40.13; Thu, 15 Mar 2018 23:40:27 -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 S1751561AbeCPGjR (ORCPT + 99 others); Fri, 16 Mar 2018 02:39:17 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:38093 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750748AbeCPGjQ (ORCPT ); Fri, 16 Mar 2018 02:39:16 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="37873194" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 16 Mar 2018 14:39:11 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id C829F486A799; Fri, 16 Mar 2018 14:39:07 +0800 (CST) Received: from localhost.localdomain (10.167.226.106) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 16 Mar 2018 14:39:07 +0800 From: Dou Liyang To: , CC: , , , , Dou Liyang Subject: [PATCH] kernel/cpu: Move cpuhp_is_atomic_state() into #ifdef CONFIG_SMP Date: Fri, 16 Mar 2018 14:38:52 +0800 Message-ID: <20180316063852.22701-1-douly.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: C829F486A799.A0549 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: douly.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 17a2f1ced028 ("cpu/hotplug: Merge cpuhp_bp_states and cpuhp_ap_states") removed the last use of cpuhp_is_atomic_state() in common case, that caused Kernel produced a warning: 'cpuhp_is_ap_state' defined but not used So, Move it into #ifdef CONFIG_SMP Reported-by: Stephen Rothwell Signed-off-by: Dou Liyang --- kernel/cpu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index a1860d42aacf..db7ec7572348 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -126,15 +126,6 @@ struct cpuhp_step { static DEFINE_MUTEX(cpuhp_state_mutex); static struct cpuhp_step cpuhp_hp_states[]; -static bool cpuhp_is_ap_state(enum cpuhp_state state) -{ - /* - * The extra check for CPUHP_TEARDOWN_CPU is only for documentation - * purposes as that state is handled explicitly in cpu_down. - */ - return state > CPUHP_BRINGUP_CPU && state != CPUHP_TEARDOWN_CPU; -} - static struct cpuhp_step *cpuhp_get_step(enum cpuhp_state state) { return cpuhp_hp_states + state; @@ -247,6 +238,15 @@ static inline void complete_ap_thread(struct cpuhp_cpu_state *st, bool bringup) complete(done); } +static bool cpuhp_is_ap_state(enum cpuhp_state state) +{ + /* + * The extra check for CPUHP_TEARDOWN_CPU is only for documentation + * purposes as that state is handled explicitly in cpu_down. + */ + return state > CPUHP_BRINGUP_CPU && state != CPUHP_TEARDOWN_CPU; +} + /* * The former STARTING/DYING states, ran with IRQs disabled and must not fail. */ -- 2.14.3