From: Nick Thompson <nick.thompson@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] GCC4.4: Squash multiple warnings due to strict aliasing
Date: Mon, 26 Sep 2011 10:26:51 +0100 [thread overview]
Message-ID: <4E80455B.4040602@ge.com> (raw)
In-Reply-To: <1317002798-27112-1-git-send-email-marek.vasut@gmail.com>
On 26/09/11 03:06, Marek Vasut wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> arch/arm/include/asm/io.h | 30 ++++++++++++++++++------------
> 1 files changed, 18 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
> index 1fbc531..61f4987 100644
> --- a/arch/arm/include/asm/io.h
> +++ b/arch/arm/include/asm/io.h
> @@ -78,43 +78,49 @@ static inline phys_addr_t virt_to_phys(void * vaddr)
> extern inline void __raw_writesb(unsigned int addr, const void *data, int bytelen)
> {
> uint8_t *buf = (uint8_t *)data;
> - while(bytelen--)
> - __arch_putb(*buf++, addr);
> + int i;
> + for (i = 0; i < bytelen; i++)
> + __arch_putb(buf[i], addr);
> }
>
This fixes the problem in these use cases, but leaves the door open.
Would it be better to change the __arch_putb macro into an extern inline function
instead which would catch these and future cases?
Nick.
next prev parent reply other threads:[~2011-09-26 9:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 2:06 [U-Boot] [PATCH] GCC4.4: Squash multiple warnings due to strict aliasing Marek Vasut
2011-09-26 9:26 ` Nick Thompson [this message]
2011-09-26 9:32 ` Marek Vasut
2011-09-26 9:44 ` Nick Thompson
2011-09-26 9:48 ` Marek Vasut
2011-09-26 11:30 ` Wolfgang Denk
2011-09-26 17:37 ` Marek Vasut
2011-09-26 18:33 ` Wolfgang Denk
2011-09-26 18:35 ` Marek Vasut
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=4E80455B.4040602@ge.com \
--to=nick.thompson@ge.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.