[PATCH v2] mtd: nand: ecc: Rework Kconfig dependencies
Miquel Raynal
miquel.raynal at bootlin.com
Wed Feb 2 06:47:45 PST 2022
Hello,
miquel.raynal at bootlin.com wrote on Mon, 31 Jan 2022 17:22:56 +0100:
> On Mon, 2022-01-31 at 14:50:32 UTC, 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 'undefined
> > reference' link errors.
> >
> > 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>
>
> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-mem-ecc.
Unfortunately this patch break other users (like sm_ftl) which are
specific cases which I forgot to take into account when writing this
change. I've found another way to handle the situation, see the patch
sent in parallel, v11 of the last change of the spi-mem-ecc series.
Thanks,
Miquèl
More information about the linux-mtd
mailing list