Re: [PATCH 02/10] [v2] clocksource: atmel_tcb: fix kconfig dependency
From: Alexandre Belloni
Date: Wed Apr 09 2025 - 08:47:50 EST
On 09/04/2025 14:22:54+0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> 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@xxxxxxxxxxxxx>
> Cc: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
> Cc: Claudiu Beznea <claudiu.beznea@xxxxxxxxx>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Reviewed-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
> ---
> 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
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com