Skip to contentSkip to conversation

watchdog: fix compile time error of pretimeout governors

PATCH In review Vladimir Zapolskiy 2 participants 2 messages Mar 11, 2019 – Mar 12, 2019 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: fix compile time error of pretimeout governors

CONFIG_WATCHDOG_PRETIMEOUT_GOV build symbol adds watchdog_pretimeout.o object to watchdog.o, the latter is compiled only if CONFIG_WATCHDOG_CORE is selected, so it rightfully makes sense to add it as a dependency.

The change fixes the next compilation errors, if CONFIG_WATCHDOG_CORE=n and CONFIG_WATCHDOG_PRETIMEOUT_GOV=y are selected:

drivers/watchdog/pretimeout_noop.o: In function `watchdog_gov_noop_register':
drivers/watchdog/pretimeout_noop.c:35: undefined reference to watchdog_register_governor' drivers/watchdog/pretimeout_noop.o: In function watchdog_gov_noop_unregister':
drivers/watchdog/pretimeout_noop.c:40: undefined reference to `watchdog_unregister_governor'

drivers/watchdog/pretimeout_panic.o: In function `watchdog_gov_panic_register':
drivers/watchdog/pretimeout_panic.c:35: undefined reference to watchdog_register_governor' drivers/watchdog/pretimeout_panic.o: In function watchdog_gov_panic_unregister':
drivers/watchdog/pretimeout_panic.c:40: undefined reference to `watchdog_unregister_governor'

Fixes ff84136cb6a4 ("watchdog: add watchdog pretimeout governor framework")
---
 drivers/watchdog/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/Kconfig +1 -0
index 242eea859637..fa325b49672e 100644
@@ -2028,6 +2028,7 @@ comment "Watchdog Pretimeout Governors"
 
 config WATCHDOG_PRETIMEOUT_GOV
 	bool "Enable watchdog pretimeout governors"
+	depends on WATCHDOG_CORE
 	help
 	  The option allows to select watchdog pretimeout governors.
 
Signature · 1 line
2.20.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Vladimir Zapolskiy

CONFIG_WATCHDOG_PRETIMEOUT_GOV build symbol adds watchdog_pretimeout.o object to watchdog.o, the latter is compiled only if CONFIG_WATCHDOG_CORE is selected, so it rightfully makes sense to add it as a dependency.

The change fixes the next compilation errors, if CONFIG_WATCHDOG_CORE=n and CONFIG_WATCHDOG_PRETIMEOUT_GOV=y are selected:

drivers/watchdog/pretimeout_noop.o: In function `watchdog_gov_noop_register':
drivers/watchdog/pretimeout_noop.c:35: undefined reference to watchdog_register_governor' drivers/watchdog/pretimeout_noop.o: In function watchdog_gov_noop_unregister':
drivers/watchdog/pretimeout_noop.c:40: undefined reference to `watchdog_unregister_governor'

Quoted 8 lines

drivers/watchdog/pretimeout_panic.o: In function `watchdog_gov_panic_register':
drivers/watchdog/pretimeout_panic.c:35: undefined reference to watchdog_register_governor' drivers/watchdog/pretimeout_panic.o: In function watchdog_gov_panic_unregister':
drivers/watchdog/pretimeout_panic.c:40: undefined reference to `watchdog_unregister_governor'

Fixes ff84136cb6a4 ("watchdog: add watchdog pretimeout governor framework")
Quoted 17 lines
---
  drivers/watchdog/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/watchdog/Kconfig +1 -0
index 242eea859637..fa325b49672e 100644
@@ -2028,6 +2028,7 @@ comment "Watchdog Pretimeout Governors"
 
  config WATCHDOG_PRETIMEOUT_GOV
  	bool "Enable watchdog pretimeout governors"
+	depends on WATCHDOG_CORE
  	help
  	  The option allows to select watchdog pretimeout governors.