Re: [PATCH] Input: applespi: Fix build error without CONFIG_PCI

From: Arnd Bergmann
Date: Thu Jul 18 2019 - 08:34:29 EST


On Thu, Jul 18, 2019 at 1:58 PM Life is hard, and then you die
<ronald@xxxxxxxxxxxxx> wrote:
> On Thu, Jul 18, 2019 at 09:15:59AM +0200, Arnd Bergmann wrote:
> > On Thu, Jul 18, 2019 at 4:07 AM YueHaibing <yuehaibing@xxxxxxxxxx> wrote:
> > Your patch correctly solves the spi_pxa2xx issue, but I'd prefer to instead
> > drop the three 'imply' statements altogether, they seem to do more harm
> > than good.
> >
> > (the circular dependency I saw might only happen when applying the
> > arm32 KASAN patches, but I expect to see them merged for linux-5.4)
>
> Isn't there more generally a problem here that this is selecting
> MFD_INTEL_LPSS_PCI even though that depends on X86? I.e. are both ARM
> and X86 selected at the same time? (sorry if I'm being naÃve, but I
> assumed only one arch can be selected at a time)

You can't have ARM and X86 defined at the same time, but Kconfig does
not know that, it just sees X86 as an undefined symbol, and ARM as
as always-enabled symbol when building for ARM.

In theory, 'imply' should deal with that and have no effect when there
are missing dependencies, but it appears that this only works for
deciding whether to turn on MFD_INTEL_LPSS_PCI, not for figuring
out loops in the dependency chain.

Arnd