linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel/watchdog: hide unused function
@ 2017-06-20 20:48 Arnd Bergmann
  2017-06-21 13:42 ` Don Zickus
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-06-20 20:48 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Don Zickus, Ingo Molnar, Babu Moger,
	Nicholas Piggin, Konstantin Khlebnikov, linux-kernel

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.

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kernel/watchdog: hide unused function
  2017-06-20 20:48 [PATCH] kernel/watchdog: hide unused function Arnd Bergmann
@ 2017-06-21 13:42 ` Don Zickus
  0 siblings, 0 replies; 2+ messages in thread
From: Don Zickus @ 2017-06-21 13:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrew Morton, Ingo Molnar, Babu Moger, Nicholas Piggin,
	Konstantin Khlebnikov, linux-kernel

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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-21 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-20 20:48 [PATCH] kernel/watchdog: hide unused function Arnd Bergmann
2017-06-21 13:42 ` Don Zickus

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).