[PATCH] clocksource: atmel_tcb: fix kconfig dependency

Arnd Bergmann posted 1 patch 9 months, 4 weeks ago
There is a newer version of this series
drivers/clocksource/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] clocksource: atmel_tcb: fix kconfig dependency
Posted by Arnd Bergmann 9 months, 4 weeks ago
From: Arnd Bergmann <arnd@arndb.de>

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 <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
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(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 468c882d9228..1dae9a5ce5d2 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -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.
 
-- 
2.39.5
Re: [PATCH] clocksource: atmel_tcb: fix kconfig dependency
Posted by Arnd Bergmann 9 months, 4 weeks ago
On Thu, Feb 20, 2025, at 09:52, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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.
>

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