[PATCH] mtd: nand: ecc: Rework Kconfig dependencies

Miquel Raynal miquel.raynal at bootlin.com
Mon Jan 31 03:00:42 PST 2022


Hi Pratyush,

p.yadav at ti.com wrote on Mon, 31 Jan 2022 16:27:54 +0530:

> On 28/01/22 06:10PM, Miquel Raynal wrote:
> > Unlike "depends on", "select" does not enforce any type (y or m), which
> > can lead to the following situation:
> > * SPI_MXIC=y expects the NAND symbols to be built statically
> > * SPI_MXIC depends on MTD_NAND_ECC
> > * MTD_NAND_ECC selects MTD_NAND_CORE
> > In this case MTD_NAND_CORE=m is "valid" but will trigger link errors
> > such as the one below.  
> 
> Did you forget to paste the error log?

Oops! Indeed.

> > The cleanest way to handle the situation is to use a "depends on"
> > between MTD_NAND_ECC and MTD_NAND_CORE to avoid such situations.
> > 
> > While at modifying the MTD_NAND_ECC symbol, fix the spacing.
> > 
> > Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>  
> 
> Reviewed-by: Pratyush Yadav <p.yadav at ti.com>

Thanks!
Miquèl



More information about the linux-mtd mailing list