[U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

Wolfgang Denk wd at denx.de
Mon Dec 12 13:18:59 CET 2011


Dear Gerlando Falauto,

In message <4EE5CA38.6090807 at keymile.com> you wrote:
>
> > if (process_var(name, nvars, vars)&&
> >             hdelete_r(name, htab) == 0)
> >       debug("DELETE ERROR ##############################\n");

This is incorrect indentation.

> I think it's easier to read it the original way, and it should not make 
> any difference as far as code size is concerned.

The Coding Style makes an explicit exception regarding the line length
for user visible strings:

 83 Statements longer than 80 columns will be broken into sensible chunks, unless
 84 exceeding 80 columns significantly increases readability and does not hide
 85 information. Descendants are always substantially shorter than the parent and
 86 are placed substantially to the right. The same applies to function headers
 87 with a long argument list. However, never break user-visible strings such as
 88 printk messages, because that breaks the ability to grep for them.

> > himport_r() is getting a bit overloaded,
> 
> Actually, I believe it makes no longer sense to have it called "_r", as 
> it was the original reference to the function being recursively 
> calleable (i.e. reentrant) as opposed to other versions which were not.

Has this changed?

> > Also, for me this patch adds 500 bytes. I wonder if more of the code
> > could made optional?
> 
> Frankly, I'm surprised to hear this adds that much overhead.
> Actually, I can't see this increase in code size as you mention.
> What architecture are you referring to?
> In my workspace (ppc_6xx) u-boot.bin and a stripped u-boot ELF file are 
> surprisingly unchanged in size, even with debug #defined!

Don't look at file size. Use the "size" command and compare code /
data / bss sizes.

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
As of 1992, they're called European Economic Community fries.


More information about the U-Boot mailing list