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

* Re: [PATCH] [v3] clocksource: atmel_tcb: fix kconfig dependency
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2025-04-29  9:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Thomas Gleixner, Arnd Bergmann, Nicolas Ferre, Claudiu Beznea,
	Alexandre Belloni, Mark Rutland, Markus Stockhausen,
	Chris Packham, Sudeep Holla, Mark Brown, Sergio Paracuellos,
	linux-kernel

On Wed, Apr 09, 2025 at 05:53:08PM +0200, 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 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>
> ---

Applied, thanks

-- 

 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* [tip: timers/clocksource] clocksource/drivers/atmel_tcb: Fix kconfig dependency
  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-bot2 for Arnd Bergmann
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Arnd Bergmann @ 2025-05-21 15:49 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Nicolas Ferre, Claudiu Beznea, Alexandre Belloni, Arnd Bergmann,
	Daniel Lezcano, x86, linux-kernel

The following commit has been merged into the timers/clocksource branch of tip:

Commit-ID:     b8239054194ad67aff7d244185ef46890c5ae71a
Gitweb:        https://git.kernel.org/tip/b8239054194ad67aff7d244185ef46890c5ae71a
Author:        Arnd Bergmann <arnd@arndb.de>
AuthorDate:    Wed, 09 Apr 2025 17:53:08 +02:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Fri, 16 May 2025 11:10:32 +02:00

clocksource/drivers/atmel_tcb: Fix kconfig dependency

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>
Link: https://lore.kernel.org/r/20250409155313.1096915-1-arnd@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 2861b2c..3b63a28 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.
 

^ 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