public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [v3] clocksource: atmel_tcb: fix kconfig dependency
@ 2025-04-09 15:53 Arnd Bergmann
  2025-04-29  9:11 ` Daniel Lezcano
  2025-05-21 15:49 ` [tip: timers/clocksource] clocksource/drivers/atmel_tcb: Fix " tip-bot2 for Arnd Bergmann
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2025-04-09 15:53 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: Arnd Bergmann, Nicolas Ferre, Claudiu Beznea, Alexandre Belloni,
	Mark Rutland, Markus Stockhausen, Chris Packham, Sudeep Holla,
	Mark Brown, Sergio Paracuellos, linux-kernel

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 require CONFIG_OF for build testing to
avoid the warning. Testing remains possible on all architectures
as CONFIG_OF is user-selectable.

Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v3: update changelog text
v2: fix build regression from dropped CONFIG_ARM dependency
---
 drivers/clocksource/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 487c85259967..a7d5a465100e 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 ARM && OF && HAS_IOMEM
+	select TIMER_OF
 	help
 	  Support for Timer Counter Blocks on Atmel SoCs.
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-21 15:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09 15:53 [PATCH] [v3] clocksource: atmel_tcb: fix kconfig dependency Arnd Bergmann
2025-04-29  9:11 ` Daniel Lezcano
2025-05-21 15:49 ` [tip: timers/clocksource] clocksource/drivers/atmel_tcb: Fix " tip-bot2 for Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox