From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Fri, 25 Oct 2019 11:36:09 +0200 Subject: [U-Boot] [PATCH v5 24/26] cmd: nand/sf: isolate legacy code In-Reply-To: References: <20191003175028.17015-1-miquel.raynal@bootlin.com> <20191003175028.17015-25-miquel.raynal@bootlin.com> <20191025112508.18f9e820@xps13> Message-ID: <20191025113609.29501658@xps13> 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 Hi Jagan, Jagan Teki wrote on Fri, 25 Oct 2019 14:57:36 +0530: > Hi Miquel, >=20 > On Fri, Oct 25, 2019 at 2:55 PM Miquel Raynal = wrote: > > > > Hi Jagan, > > > > Jagan Teki wrote on Fri, 25 Oct 2019 > > 14:44:38 +0530: > > =20 > > > On Thu, Oct 3, 2019 at 11:21 PM Miquel Raynal wrote: =20 > > > > > > > > The 'sf' command is not supposed to rely on the MTD stack, but both > > > > 'sf' and 'nand' commands use helpers located in mtd_uboot.c. Despite > > > > their location, these functions do not depend at all on the MTD > > > > stack. > > > > > > > > This file (drivers/mtd/mtd_uboot.c) is only compiled if CONFIG_MTD = is > > > > selected, which is inconsistent with the current situation. Solve t= his > > > > by moving these three functions (which are only used by the above t= wo > > > > commands) out of mtd_uboot.c and put them in a C file only compiled > > > > with cmd/sf.c and cmd/nand.c. > > > > > > > > Signed-off-by: Miquel Raynal > > > > --- > > > > cmd/Makefile | 3 ++ > > > > cmd/legacy-mtd-utils.c | 99 +++++++++++++++++++++++++++++++++++++= ++++ > > > > cmd/legacy-mtd-utils.h | 14 ++++++ > > > > cmd/nand.c | 2 + > > > > cmd/sf.c | 2 + > > > > drivers/mtd/mtd_uboot.c | 94 -------------------------------------= - =20 > > > > > > Better to drop CMD_SF, CMD_NAND in makefile so-that it can't build > > > this file in this patch. =20 > > > > I don't understand what you mean. Can you please detail what you have > > in mind for this patch? > > > > Is it something blocking for you? Or is it something that should be > > taken care of after? =20 >=20 > I think it is simple rebase, this patch is moving code from > mtd_uboot.c to legacy-mtd-utils.c but mtd_uboot still building. I'm > saying to make change on drivers/mtd/Makefile to drop SF, NAND > dependency. What do you mean by "mtd_uboot still building"? Do you mean it is a problem? Or did I forgot something? I don't see what CMD_SF/CMD_NAND dependency you are referring to. Can you please share a snippet of code? Thanks, Miqu=C3=A8l