From: Arnd Bergmann <arnd@arndb.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Don Zickus <dzickus@redhat.com>,
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: [PATCH] kernel/watchdog: hide unused function
Date: Tue, 20 Jun 2017 22:48:44 +0200 [thread overview]
Message-ID: <20170620204854.966601-1-arnd@arndb.de> (raw)
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
next reply other threads:[~2017-06-20 20:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-20 20:48 Arnd Bergmann [this message]
2017-06-21 13:42 ` Don Zickus
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=20170620204854.966601-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=babu.moger@oracle.com \
--cc=dzickus@redhat.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
all inboxes | Powered by JetHome®