[U-Boot] [PATCH v2] Add support for Wandboard quad.

Wolfgang Denk wd at denx.de
Mon Jun 3 15:01:35 CEST 2013


Dear Otavio,

In message <CAP9ODKonqM3QLeryOBrgvgfqwdrT+2ePfk+MBECzewDhjQ6FQg at mail.gmail.com> you wrote:
>
> > Please do NOT use these terrible  SZ_*  defines.  Never, ever.
> >
> > They are dangerous and should be avoided.
> >
> 
> Do you mind to explain why?

Well, what does "SZ_1M" mean?  Is it 1000 * 1000 (as on hard disk
drives) or 1000 * 1024 (as on floppy disks) or 1024 * 1024 (as for
memory sizes)?

Instead of just seeing at first look what the code does, you have to
look up the actual define, i. e. it obfuscates the code instead of
being helpful.

This has been discussed several times before on the list; see for
example [1] or [2].

[1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/67552/focus=67575
[2] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/93425

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
I paid too much for it, but its worth it.


More information about the U-Boot mailing list