Subject: Re: linux-next: build failure after merge of the spi tree

From: André Almeida <[email-masked]>
Date: Wed, 16 Feb 2022 10:07:02 -0300

Às 09:20 de 16/02/22, André Almeida escreveu:
> Hi Stephen,
> 
> Às 02:17 de 16/02/22, Stephen Rothwell escreveu:
>> Hi all,
>>
>> After merging the spi tree, today's linux-next build (powerpc
>> allyesconfig) failed like this:
>>
>> drivers/spi/spi-amd.c:333:37: error: 'spi_acpi_match' undeclared here (not in a function)
>>   333 |                 .acpi_match_table = spi_acpi_match,
>>       |                                     ^~~~~~~~~~~~~~
>>
>> Caused by commit
>>
>>   209043554915 ("spi: amd: Add support for version AMDI0062")
>>
>> CONFIG_ACPI is not set for this build.
>>
>> I have reverted that commit for today.
>>
> 
> Thanks for input. I'll send a new series with a patch to make this
> driver depends on ACPI then. My patch touched this line, but this
> variable was there before, so I think this build breakage is happening
> for some time.

Actually, the following diff in my commit is the problem:

-		.acpi_match_table = ACPI_PTR(spi_acpi_match),
+		.acpi_match_table = spi_acpi_match,

ACPI_PTR() make it as NULL if CONFIG_ACPI is not set, making the driver
suitable for test compiling even without ACPI enabled. Mark, I'll send a
v3 with this fixed.