From: Wolfgang Denk Date: Thu, 19 Mar 2009 11:06:15 +0100 Subject: [U-Boot] [PATCH v2] Separate mtdparts command from jffs2 In-Reply-To: <200903191041.45190.sr@denx.de> References: <1237451843-8870-1-git-send-email-sr@denx.de> <20090319091912.F387785124B3@gemini.denx.de> <200903191041.45190.sr@denx.de> Message-ID: <20090319100615.67A71832E8B7@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Stefan Roese, In message <200903191041.45190.sr@denx.de> you wrote: > ... > > We drop > 2000 lines of code here, which represents a lot of important > > functions. > > > > I wonder if this patch has ever been tested? > > Yes, it has. > > I generated this patch with the "find-copies-harder" option. This makes the > status output harder to read. I'll send an updated patch in short while. You are right. Stupid me. So here the rest of my review comments: > @@ -1142,7 +217,7 @@ static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_ > * @param dev_num parsed device number (output) > * @return 0 on success, 1 otherwise > */ > -int id_parse(const char *id, const char **ret_id, u8 *dev_type, u8 *dev_num) > +static int id_parse(const char *id, const char **ret_id, u8 *dev_type, u8 *dev_num) ... mtd_id_parse() ? > @@ -782,7 +763,7 @@ static int part_parse(const char *const partdef, const char **ret, struct part_i > * @param dev device to validate > * @return 0 if device is valid, 1 otherwise > */ > -static int device_validate(u8 type, u8 num, u32 *size) > +int device_validate(u8 type, u8 num, u32 *size) mtd_device_validate() ? Now that we make these funtions publicly visible we whould make sure that there will be no namespace collissions. I think we shoudl therefor rename these functions. > diff --git a/include/config_cmd_all.h b/include/config_cmd_all.h > index 205dd1f..4c6a4b1 100644 > --- a/include/config_cmd_all.h > +++ b/include/config_cmd_all.h > @@ -62,6 +62,7 @@ > #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ > #define CONFIG_CMD_NFS /* NFS support */ > #define CONFIG_CMD_ONENAND /* OneNAND support */ > +#define CONFIG_CMD_MTDPARTS /* mtd parts support */ > #define CONFIG_CMD_PCI /* pciinfo */ > #define CONFIG_CMD_PCMCIA /* PCMCIA support */ > #define CONFIG_CMD_PING /* ping support */ Please keep lists sorted. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de When properly administered, vacations do not diminish productivity: for every week you're away and get nothing done, there's another when your boss is away and you get twice as much done. -- Daniel B. Luten