[U-Boot] [PATCH] display_buffer: fix misaligned buffer

Stefano Babic sbabic at denx.de
Mon Aug 30 12:31:55 CEST 2010


Detlev Zundel wrote:
> Hi Reinhard,
> 
Hi Reinhard, hi Detlev,

>> should make the buffer an union:
>>
>> union {
>> 	uint32_t ui[MAX.../4+1];
>> 	uint16_t us[MAX.../2+1];
>> 	uint8_t  uc[MAX...+1];
>> } linebuf;
> 
> That also sounds good indeed - it even better documents the intention of
> the code so by my own arguments I'd vote for it.  I presume you will
> follow up with such a patch once you tested it?

I agree this is a better solution as adding a simple comment. Some time
a comment is valid only at the time of the writing, and further patches
could drop its meaning if the comment is not updated, too.

Detlev, regarding the discussion I would only point out that we have to
be sure that such kind of patch will be merged in the current release.
It would be a real pity if a new official realease is published and then
even a simple "md" command does not work on ARM.

Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list