Re: [PATCH] i2c: Disable I2C_APPLE on PPC when COMPILE_TEST is set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 27, 2023, at 04:54, Benjamin Gray wrote:
> 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/202112061809.XT99aPrf-lkp@xxxxxxxxx
>
> Suggested-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> Signed-off-by: Benjamin Gray <bgray@xxxxxxxxxxxxx>

This should work, but I find the added dependency is a bit
confusing to readers.

>  drivers/i2c/busses/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index d4975444a32d..3db56e446902 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -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



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux