[U-Boot] [PATCH] omap3evm: Clean-up EVM detection code.
Albert ARIBAUD
albert.aribaud at free.fr
Thu Dec 2 13:33:47 CET 2010
Le 02/12/2010 13:01, Wolfgang Denk a écrit :
> Dear Albert ARIBAUD,
>
> In message<4CF7896B.5090007 at free.fr> you wrote:
>>
>> Note that initialization should be unnecessary if the static variable is
>> int rather than u8.
>
> It should ALWAYS be not necessary.
I understand your point re: the linker warning, i.e. initializing should
never be done to just get rid of a warning.
> Otherwise we have a bug, and that bug needs to be fixed rather than
> papered over.
Yes, there is a bug whereby an u8 BSS variable causes a linker warning,
and I believe this bug to be with the linker -- I'm working on getting a
minimal example of it so that I could completely verify that the warning
does not affect the semantics of the code generated.
Now, on an unrelated note, omap3_emv's code arbitrarily uses an u8 where
an int (or enum) would be more appropriate, and this should be changed
not because it removes a linker warning, but because the u8 choice is
arbitrary and at best as effective as using an int, at worst suboptimal
to that.
> Best regards,
>
> Wolfgang Denk
Amicalement,
--
Albert.
More information about the U-Boot
mailing list