From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] display_buffer: fix misaligned buffer
Date: Tue, 31 Aug 2010 00:29:32 +0200 [thread overview]
Message-ID: <m2bp8jivjn.fsf@ohwell.denx.de> (raw)
In-Reply-To: <4C7BF271.1050808@free.fr> (Albert ARIBAUD's message of "Mon, 30 Aug 2010 20:03:29 +0200")
Hi Albert,
> Le 30/08/2010 18:47, Detlev Zundel a ?crit :
>> Hi Reinhard,
>>
>>> Detlev Zundel schrieb:
>>>
>>>>> 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.
>>>>
>>>> I don't see a problem here. All proposed patches (with/without
>>>> attribute and union) surely fix a bug, so they will go into mainline
>>>> when consent is reached on which one to use. This should well happen
>>>> before the pending release on September 12th[1].
>>>>
>>>> Am I misunderstanding anything here?
>>>
>>> No... but I would require that the "union" approach would be wanted,
>>> BEFORE I put effort into doing it.
>>
>> I'd very much appreciate your effort as I want the solution now that you
>> did whet my appetite.
>
> Besides, re: 'fixing with the side-effect of a different thing': I think
> the alignment caused by using an union is not actually a side effect of
> it but an intended effect of it, as the compiler must ensure correct
> alignment of each union member -- on architectures where alignment of
> 32-bit ints is unnecessary, the union will not cause undue alignment,
> whereas the __aligned__ attribute would.
Absolutely and that's why I like the solution. It clearly states the
intentions of the code.
The 'side effect of another thing' that I was talking about was the
proposed local change of using an uint32_t array for something which
originally was an uint8_t array in order to gain the alignment.
Cheers
Detlev
--
Greenspun's Tenth Rule of Programming: "Any sufficiently complicated C
or Fortran program contains an ad-hoc, informally-specified bug-ridden
slow implementation of half of Common Lisp."
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
next prev parent reply other threads:[~2010-08-30 22:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-27 20:23 [U-Boot] [PATCH] display_buffer: fix misaligned buffer Reinhard Meyer
2010-08-30 8:59 ` Detlev Zundel
2010-08-30 9:22 ` Reinhard Meyer
2010-08-30 9:39 ` Reinhard Meyer
2010-08-30 10:02 ` Detlev Zundel
2010-08-30 10:31 ` Stefano Babic
2010-08-30 10:46 ` Albert ARIBAUD
2010-08-30 11:04 ` Reinhard Meyer
2010-08-30 11:05 ` Detlev Zundel
2010-08-30 13:37 ` Reinhard Meyer
2010-08-30 16:47 ` Detlev Zundel
2010-08-30 18:03 ` Albert ARIBAUD
2010-08-30 18:25 ` Reinhard Meyer
2010-08-30 22:32 ` Detlev Zundel
2010-08-30 22:29 ` Detlev Zundel [this message]
2010-08-31 5:38 ` Albert ARIBAUD
2010-08-31 6:04 ` Reinhard Meyer
2010-09-01 15:01 ` Detlev Zundel
2010-09-02 7:39 ` Wolfgang Denk
2010-09-02 17:42 ` Mike Frysinger
2010-09-07 23:23 ` Wolfgang Denk
2010-08-30 9:49 ` Detlev Zundel
2010-09-07 23:22 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2bp8jivjn.fsf@ohwell.denx.de \
--to=dzu@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox