Re: [PATCH v2 -next] spi: fix spi-sprd-adi build errors when SPI_SPRD_ADI=y and HWSPINLOCK=m

From: Mark Brown
Date: Mon Sep 25 2017 - 14:44:54 EST


On Mon, Sep 25, 2017 at 10:19:56AM -0700, Randy Dunlap wrote:
> On 09/25/17 09:12, Mark Brown wrote:

> > Why is that not just an || COMPILE_TEST dependency then? The dependency
> > you're trying to introduce is weird and confusing, we shouldn't be
> > having to do things like that.

> It already uses COMPILE_TEST:

> config SPI_SPRD_ADI
> tristate "Spreadtrum ADI controller"
> depends on ARCH_SPRD || COMPILE_TEST
> help
> ADI driver based on SPI for Spreadtrum SoCs.

> but that allows build errors when SPI_SPRD_ADI=y and HWSPINLOCK=y.

> As for the dependency that I am adding:
> + depends on HWSPINLOCK || HWSPINLOCK=n

> that idiom is used over and over again in Kconfig files to prevent this kind of
> build problem in loadable modules.

And what is that equivalent to in relation to COMPILE_TEST, especially
considering the situations where you'd build this without hwspinlock
support?

Attachment: signature.asc
Description: PGP signature