Re: [PATCH 02/10] [v2] clocksource: atmel_tcb: fix kconfig dependency

From: Arnd Bergmann
Date: Wed Apr 09 2025 - 12:03:55 EST


On Wed, Apr 9, 2025, at 17:30, Andy Shevchenko wrote:
> On Wed, Apr 09, 2025 at 02:22:54PM +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.
>
> I;m a bit puzzled, maybe due to my misunderstanding of the first line...
>
>> config ATMEL_TCB_CLKSRC
>> bool "Atmel TC Block timer driver" if COMPILE_TEST
>
> ...^^^ of the dependencies.
>
>> - depends on ARM && HAS_IOMEM
>> - select TIMER_OF if OF
>> + depends on ARM && OF && HAS_IOMEM
>
> But doesn't this still mean that "all architectures" (from the commit message)
> do not apply here (it's all about ARM)?

You are right, my mistake:

v1 of the patch allowed building on all architectures, but that
turned out to run into other bugs, so I changed the contents but
forgot to change the changelog.

I've sent a v3 patch now.

Arnd