[U-Boot] [RESEND PATCH v2 1/5] Tegra2: Add macros to calculate bitfield shifts and masks
Wolfgang Denk
wd at denx.de
Thu Jul 14 20:30:29 CEST 2011
Dear Anton Staaf,
In message <CAF6FioWbAvTnL0m2ch4Xd5O51bp7SX=LLOPG0DXNSzSfwVvm+g at mail.gmail.com> you wrote:
>
> I'm not sure which example you mean. If you mean his #define of the
> masks explicitly, those are fine by me. My above statement is about
> the masking, oring and shifting that is done in the same way every
> time and could be encoded in a macro that makes it easier to see what
> exactly is going on. Or did I misunderstand which example you mean?
I disagree with your statement that such a macro "makes it easier to
see what exactly is going on." On contrary, such a macro would _hide_
what is going on. This may be ok and even intentional in some places,
but here it is not helpful, even if it seems so you you.
Quote Larry Wall (from the perlstyle(1) man page):
Even if you aren't in doubt, consider the mental welfare of the per-
son who has to maintain the code after you ...
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
Our business is run on trust. We trust you will pay in advance.
More information about the U-Boot
mailing list