[U-Boot] [PATCH v5 2/3] mtd, nand: move common functions from cmd_nand.c to common place

Scott Wood scottwood at freescale.com
Thu Apr 23 19:48:25 CEST 2015


On Thu, 2015-04-23 at 13:12 +0200, Heiko Schocher wrote:
> Hello Scott,
> 
> Am 23.04.2015 08:55, schrieb Scott Wood:
> > On Thu, 2015-04-23 at 07:57 +0200, Heiko Schocher wrote:
> >> Hello Scott,
> >>
> >> Am 23.04.2015 00:47, schrieb Scott Wood:
> >>> On Mon, 2015-04-20 at 07:47 +0200, Heiko Schocher wrote:
> >>>> +int str2off(const char *p, loff_t *num);
> >>>> +int str2long(const char *p, ulong *num);
> >>>
> >>> These should be moved somewhere more generic, especially if they're no
> >>> longer file-local.
> >>
> >> Hmm... the code is currently in "drivers/mtd/mtd_uboot.c" ... maybe
> >> we add a "mtd_" prefix to them? I think these functions are mtd specific ...
> >
> > What is mtd-specific about them?
> 
> Hmm... I thought:
> 
> return *p != '\0' && *endptr == '\0';
> 
> is more or less mtd specific ... but you are right, it is not really
> mtd specific ... so I move them to "./lib/vsprintf.c" ... Ok?

OK.  Maybe change the return to bool while you're at it, to make it
clear that it isn't return-zero-on-success.

-Scott




More information about the U-Boot mailing list