From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregory CLEMENT Date: Wed, 17 Apr 2019 11:26:58 +0200 Subject: [U-Boot] [PATCH] mtd: nand: raw: Fix CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT behaviour In-Reply-To: <20190417111721.73f609ab@xps13> References: <20190417090942.19595-1-gregory.clement@bootlin.com> <20190417111721.73f609ab@xps13> Message-ID: <87bm159e3h.fsf@FE-laptop> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Miquel Raynal writes: Hi Miquel, > Hi Gregory, > > Gregory CLEMENT wrote on Wed, 17 Apr 2019 > 11:09:42 +0200: > >> The purpose of "mtd: nand: raw: allow to disable unneeded ECC layouts" >> was to allow disabling the default ECC layouts if a driver is known to >> provide its own ECC layout. However, this commit did the opposite and >> disbaled the default layout whqant it was _not_ selectec. > > when selected > >>=20 >> It breaks all the driver nand that not providing their ecc layout, this > > What about "It breaks all the NAND drivers not providing their own ECC > layout". > >> patch fix this sitution. > > situation > >>=20 >> It was tested with the lpc32xx_nand_slc driver. >>=20 >> Fixes: a38c3af868 ("mtd: nand: raw: allow to disable unneeded ECC layout= s") >> Signed-off-by: Gregory CLEMENT >> --- > > I missed that mistake in my original review. Thanks for fixing it. > > With above typos fixed: > > Reviewed-by: Miquel Raynal Thanks I've just sent a v2 with the typo fixed and the new wording as well as a another typo fix in the topic. Thanks, Gregory > >> drivers/mtd/nand/raw/nand_base.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >>=20 >> diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nan= d_base.c >> index 6d2ff58d86..dc4576a3a1 100644 >> --- a/drivers/mtd/nand/raw/nand_base.c >> +++ b/drivers/mtd/nand/raw/nand_base.c >> @@ -47,7 +47,7 @@ >> #include >> =20 >> /* Define default oob placement schemes for large and small page device= s */ >> -#ifdef CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT >> +#ifndef CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT >> static struct nand_ecclayout nand_oob_8 =3D { >> .eccbytes =3D 3, >> .eccpos =3D {0, 1, 2}, >> @@ -4341,7 +4341,7 @@ int nand_scan_tail(struct mtd_info *mtd) >> */ >> if (!ecc->layout && (ecc->mode !=3D NAND_ECC_SOFT_BCH)) { >> switch (mtd->oobsize) { >> -#ifdef CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT >> +#ifndef CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT >> case 8: >> ecc->layout =3D &nand_oob_8; >> break; > > Thanks, > Miqu=C3=A8l --=20 Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com