i2c: Disable I2C_APPLE on PPC when COMPILE_TEST is set
PATCH 1/1 i2c: Disable I2C_APPLE on PPC when COMPILE_TEST is set
The ppc64le_allmodconfig sets I2C_PASEMI=y and leaves COMPILE_TEST to default to y and I2C_APPLE to default to m, running into a known incompatible configuration that breaks the build [1].
Disable the I2C_APPLE build during PPC compile tests to prevent this.
[1]: https://lore.kernel.org/all/[email protected]
--- drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/Kconfig +1 -1
@@ -896,7 +896,7 @@ config I2C_PASEMI config I2C_APPLE tristate "Apple SMBus platform driver" - depends on ARCH_APPLE || COMPILE_TEST + depends on ARCH_APPLE || (COMPILE_TEST && !PPC) default ARCH_APPLE help Say Y here if you want to use the I2C controller present on Apple
base-commit: ec0a1b360aec1ba0bdfad3dd69e300b028529c0d --
2.39.2
Quoted 10 lines · Benjamin Gray
The
ppc64le_allmodconfigsets I2C_PASEMI=y and leavesCOMPILE_TESTto default to y andI2C_APPLEto default to m, running into a known incompatible configuration that breaks the build [1].Disable the
I2C_APPLEbuild during PPC compile tests to prevent this.[1]: https://lore.kernel.org/all/[email protected]
Suggested-by Michael Ellerman <[email protected]>Signed-off-by Benjamin Gray <[email protected]>
This should work, but I find the added dependency is a bit confusing to readers.
Quoted 8 lines
drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/Kconfig +0
-0
drivers/i2c/busses/Kconfig config I2C_PASEMI · line 900
Quoted 6 lines
drivers/i2c/busses/Kconfig +1
-1@@ -896,7 +896,7 @@ config I2C_PASEMI config I2C_APPLE tristate "Apple SMBus platform driver" - depends on ARCH_APPLE || COMPILE_TEST + depends on ARCH_APPLE || (COMPILE_TEST && !PPC) default ARCH_APPLE
I would add a line such as
depends on !I2C_PASEMI
which actually still allows building both drivers as loadable modules but prevents I2C_APPLE=y when I2C_PASEMI=m or vice versa. For completeness, it might be good to extend the I2C_PASEMI dependency to include '|| COMPILE_TEST', which would ensure that any future problems show up on x86 builds as well, rather than just powerpc.
Arnd