2022-02-16 06:56:02

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the spi tree

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.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-02-16 12:36:39

by André Almeida

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the spi tree

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.

2022-02-16 13:17:06

by André Almeida

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the spi tree

À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.

2022-02-16 18:11:02

by André Almeida

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the spi tree

Às 13:08 de 16/02/22, Mark Brown escreveu:
> On Wed, Feb 16, 2022 at 10:07:02AM -0300, André Almeida wrote:
>
>> 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.
>
> Please do not submit new versions of already applied patches, please
> submit incremental updates to the existing code. Modifying existing
> commits creates problems for other users building on top of those
> commits so it's best practice to only change pubished git commits if
> absolutely essential.

Ok, let me send a fixing patch then.

2022-02-16 18:24:30

by Mark Brown

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the spi tree

On Wed, Feb 16, 2022 at 10:07:02AM -0300, Andr? Almeida wrote:

> 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.

Please do not submit new versions of already applied patches, please
submit incremental updates to the existing code. Modifying existing
commits creates problems for other users building on top of those
commits so it's best practice to only change pubished git commits if
absolutely essential.


Attachments:
(No filename) (542.00 B)
signature.asc (499.00 B)
Download all attachments

2022-02-16 18:39:48

by Mark Brown

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the spi tree

On Wed, Feb 16, 2022 at 09:20:38AM -0300, Andr? Almeida wrote:

> 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.

No, don't do that - just compile out the ACPI support when not in use
like other drivers do. A dependency on ACPI || COMPILE_TEST could be
useful but you still need to fix the driver.


Attachments:
(No filename) (487.00 B)
signature.asc (499.00 B)
Download all attachments