Skip to contentSkip to conversation

watchdog: Enforce that at least one pretimeout governor is enabled

PATCH New Guenter Roeck 1 participant 1 message May 8, 2019 Watchdog device drivers

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 1/1 watchdog: Enforce that at least one pretimeout governor is enabled

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

---
Fixes: sha is from next-20190507.

 drivers/watchdog/Kconfig | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/watchdog/Kconfig +6 -0
index e19960ace0c0..4a3461afa96f 100644
@@ -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
Signature · 1 line
2.7.4