[U-Boot] [RESEND PATCH v2 1/5] Tegra2: Add macros to calculate bitfield shifts and masks
Anton Staaf
robotboy at google.com
Thu Jul 14 20:42:01 CEST 2011
On Thu, Jul 14, 2011 at 11:30 AM, Wolfgang Denk <wd at denx.de> wrote:
> 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.
OK, I'm content to disagree on this and do it your way. :) I can do
it my way on my projects. Thanks for the discussion.
> 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 ...
Taking style guides from Larry is not high on my list by the way. :)
Thanks,
Anton
> 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