[U-Boot] [PATCH 1/4] common: add run_command2 for running simple or hush commands

Wolfgang Denk wd at denx.de
Mon Jun 6 22:09:58 CEST 2011


Dear "Jason Hobbs",

In message <20110606195832.GA4833 at jhobbs-laptop> you wrote:
>
> The if (s) line and the rest of this block were indented with spaces
> before I changed it.  Should I make the cosmetic change of correct the
> indentation there to use tabs as part of this patch?

Yes, please.  But as a separate pacth, earlier in this series.

> > Why do you make this function return int when there is no tesing of
> > the return code anywhere?
> 
> Where run_command2 replaced run_command/parse_string_outer blocks in
> main.c, there was no checking of the return codes of those functions
> already.  I do use the return code of it in cmd_pxecfg.c, which is
> introduced later in this patch series.

I see.  OK.

> > And why do you make this not an inline function (or macro) so the
> > compiler could avoid the function call overhead?
> 
> No particular reason - I just didn't consider optimization.  Is common.h
> the best place to place this as an inline function?

No.  Sorry, I have no good recommendation at the moment either.

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
"The question of whether a computer can think is no more  interesting
than the question of whether a submarine can swim"
                                                - Edsgar W.  Dijkstra


More information about the U-Boot mailing list