linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Babu Moger <babu.moger@oracle.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Konstantin Khlebnikov <khlebnikov@yandex-team.ru>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernel/watchdog: hide unused function
Date: Wed, 21 Jun 2017 09:42:50 -0400	[thread overview]
Message-ID: <20170621134250.mgm7vstrqjyapo4h@redhat.com> (raw)
In-Reply-To: <20170620204854.966601-1-arnd@arndb.de>

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 <dzickus@redhat.com>

> 
> Fixes: mmotm ("kernel/watchdog: provide watchdog_nmi_reconfigure() for arch watchdogs")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  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
> 

      reply	other threads:[~2017-06-21 13:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 20:48 [PATCH] kernel/watchdog: hide unused function Arnd Bergmann
2017-06-21 13:42 ` Don Zickus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170621134250.mgm7vstrqjyapo4h@redhat.com \
    --to=dzickus@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=babu.moger@oracle.com \
    --cc=khlebnikov@yandex-team.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).