Skip to contentSkip to conversation

clocksource: atmel_tcb: fix kconfig dependency

PATCH Superseded Arnd Bergmann 2 participants 2 messages Feb 20, 2025 Clocksource, clockevent drivers

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clocksource: atmel_tcb: fix kconfig dependency

From: Arnd Bergmann <[email protected]>

Build-testing this driver on arm without CONFIG_OF produces a warning:

drivers/clocksource/timer-atmel-tcb.c:368:34: error: 'atmel_tcb_of_match' defined but not used [-Werror=unused-const-variable=]

  368 | static const struct of_device_id atmel_tcb_of_match[] = {
      |                                  ^~~~~~~~~~~~~~~~~~

Change the dependency to allow build-testing on all architectures but instead require CONFIG_OF to be present.

Cc Nicolas Ferre <[email protected]>
Cc Alexandre Belloni <[email protected]>
Cc Claudiu Beznea <[email protected]>

---
I saw this for the first time today in a randconfig build, but I think this has been around for a long time without ever showing up in random configs.

---
 drivers/clocksource/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clocksource/Kconfig +2 -2
index 468c882d9228..1dae9a5ce5d2 100644
@@ -437,8 +437,8 @@ config ATMEL_ST
 
 config ATMEL_TCB_CLKSRC
 	bool "Atmel TC Block timer driver" if COMPILE_TEST
-	depends on ARM && HAS_IOMEM
-	select TIMER_OF if OF
+	depends on OF && HAS_IOMEM
+	select TIMER_OF
 	help
 	  Support for Timer Counter Blocks on Atmel SoCs.
 
Signature · 1 line
2.39.5
#1 lore raw
Quoted 4 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Build-testing this driver on arm without CONFIG_OF produces a warning:

Quoted 9 lines

drivers/clocksource/timer-atmel-tcb.c:368:34: error:
'atmel_tcb_of_match' defined but not used [-Werror=unused-const-variable=]

  368 | static const struct of_device_id atmel_tcb_of_match[] = {
      |                                  ^~~~~~~~~~~~~~~~~~

Change the dependency to allow build-testing on all architectures but instead require CONFIG_OF to be present.

And the second I send this out, another failure pops up, please disregard this version as the CONFIG_ARM dependency is still needed for register_current_timer_delay().

Arnd