[U-Boot] [PATCH v3] arm926ejs: timer: Replace bss variable by gdr

Alexander Holler holler at ahsoftware.de
Sat Jan 22 10:21:36 CET 2011


Am 22.01.2011 08:46, schrieb Albert ARIBAUD:
> Le 22/01/2011 06:39, Alexander Holler a écrit :
>> Hello,
>>
>> Am 21.01.2011 09:56, schrieb Heiko Schocher:
>>
>>> -static ulong timestamp;
>>> -static ulong lastdec;
>>> +DECLARE_GLOBAL_DATA_PTR;
>>> +
>>> +#define timestamp gd->tbl
>>> +#define lastdec gd->lastinc
>>
>> I'm the only one who doesn't like such defines? They might be handy for
>> quick fixes, but in regard to style and readablity I don't like them.
>> When looking at teh code where they will used, you won't see the actual
>> place where they are stored. And in more complex expression they might
>> become dangerous to use because they hide the operator "->".
>
> I accept the patch because it un-breaks support for ARM cpus, and I
> prefer a working fix to a perfect fix in this specific, transitional,
> situation.

My experience is that such quick fixes (or workarounds) usually 
manifests (because they become forgotten) and later on might even be 
copied to other places. ;)

Anyway, I'll have to thank for that patch, because it fixes at least one 
of the problems I have while trying to chainload a 2010.12 from a 
2010.12 on a kirkwood system.

Regards, and again, thanks for the patch, even if I found it ugly,

Alexander



More information about the U-Boot mailing list