* [PATCH] watchdog: Enforce that at least one pretimeout governor is enabled
@ 2019-05-08 0:43 Guenter Roeck
0 siblings, 0 replies; only message in thread
From: Guenter Roeck @ 2019-05-08 0:43 UTC (permalink / raw)
To: Wim Van Sebroeck; +Cc: linux-watchdog, linux-kernel, Guenter Roeck
Since commit "watchdog: Use depends instead of select for pretimeout
governors", it was possible to enable pretimeout governors but keep all
of them disabled. Doing this results in the following build failure.
../drivers/watchdog/watchdog_pretimeout.c:
In function ‘watchdog_register_governor’:
../drivers/watchdog/watchdog_pretimeout.c:139:26: error:
‘WATCHDOG_PRETIMEOUT_DEFAULT_GOV’ undeclared
if (!strncmp(gov->name, WATCHDOG_PRETIMEOUT_DEFAULT_GOV,
Since it does not make sense to enable pretimeout support but disable
all pretimeout governors, enforce that at least one of them is always
enabled.
Fixes: f627ac0e12cd ("watchdog: Use depends instead of select for pretimeout governors")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
Fixes: sha is from next-20190507.
drivers/watchdog/Kconfig | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index e19960ace0c0..4a3461afa96f 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -71,6 +71,12 @@ config WATCHDOG_PRETIMEOUT_GOV
help
The option allows to select watchdog pretimeout governors.
+config WATCHDOG_PRETIMEOUT_GOV_SEL
+ tristate
+ depends on WATCHDOG_PRETIMEOUT_GOV
+ default m
+ select WATCHDOG_PRETIMEOUT_GOV_PANIC if WATCHDOG_PRETIMEOUT_GOV_NOOP=n
+
if WATCHDOG_PRETIMEOUT_GOV
config WATCHDOG_PRETIMEOUT_GOV_NOOP
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-05-08 0:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 0:43 [PATCH] watchdog: Enforce that at least one pretimeout governor is enabled Guenter Roeck
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).