Skip to contentSkip to conversation

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

DISCUSSION Stephen Rothwell 3 participants 6 messages Feb 16, 2022 Linux-next tree

lore
Share & tools
lore
#0 lore raw

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.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hi Stephen,

Às 02:17 de 16/02/22, Stephen Rothwell escreveu:

Quoted 9 lines

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,

      |                                     ^~~~~~~~~~~~~~
Quoted 8 lines

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.

#2 lore raw

Às 09:20 de 16/02/22, André Almeida escreveu:

Quoted 18 lines

Hi Stephen,

Às 02:17 de 16/02/22, Stephen Rothwell escreveu:

Quoted 15 lines

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.

Quoted 7 lines
Quoted 2 lines

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.

maintainer
#3 lore raw
Quoted 3 lines · André Almeida

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.

#4 lore raw

Às 13:08 de 16/02/22, Mark Brown escreveu:

Quoted 11 lines · André Almeida
Quoted 4 lines

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.

maintainer
#5 lore raw
In reply to André Almeida
Quoted 4 lines · André Almeida

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.