Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751934AbdFUNmx (ORCPT ); Wed, 21 Jun 2017 09:42:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56354 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992AbdFUNmw (ORCPT ); Wed, 21 Jun 2017 09:42:52 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A9A497CE0A Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dzickus@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A9A497CE0A Date: Wed, 21 Jun 2017 09:42:50 -0400 From: Don Zickus To: Arnd Bergmann Cc: Andrew Morton , Ingo Molnar , Babu Moger , Nicholas Piggin , Konstantin Khlebnikov , linux-kernel@vger.kernel.org Subject: Re: [PATCH] kernel/watchdog: hide unused function Message-ID: <20170621134250.mgm7vstrqjyapo4h@redhat.com> References: <20170620204854.966601-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170620204854.966601-1-arnd@arndb.de> User-Agent: NeoMutt/20170428-dirty (1.8.2) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 21 Jun 2017 13:42:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1309 Lines: 53 On Tue, Jun 20, 2017 at 10:48:44PM +0200, Arnd Bergmann wrote: > watchdog_update_cpus() is defined unconditionally, but only used when > CONFIG_SYSCTL is defined: > > kernel/watchdog.c:608:12: error: 'watchdog_update_cpus' defined but not used [-Werror=unused-function] > > This adds another #ifdef around it. Thanks! Acked-by: Don Zickus > > Fixes: mmotm ("kernel/watchdog: provide watchdog_nmi_reconfigure() for arch watchdogs") > Signed-off-by: Arnd Bergmann > --- > kernel/watchdog.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/kernel/watchdog.c b/kernel/watchdog.c > index 06cd965f64d2..95361f9f3f40 100644 > --- a/kernel/watchdog.c > +++ b/kernel/watchdog.c > @@ -605,11 +605,13 @@ static void watchdog_disable_all_cpus(void) > } > } > > +#ifdef CONFIG_SYSCTL > static int watchdog_update_cpus(void) > { > return smpboot_update_cpumask_percpu_thread( > &watchdog_threads, &watchdog_cpumask); > } > +#endif > > #else /* SOFTLOCKUP */ > static int watchdog_park_threads(void) > @@ -630,10 +632,12 @@ static void watchdog_disable_all_cpus(void) > { > } > > +#ifdef CONFIG_SYSCTL > static int watchdog_update_cpus(void) > { > return 0; > } > +#endif > > static void set_sample_period(void) > { > -- > 2.9.0 >