public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] board/esd/cpci405/cpci405.c: Fix GCC 4.6 warning
Date: Fri, 25 Nov 2011 14:56:10 -0500	[thread overview]
Message-ID: <201111251456.11305.vapier@gentoo.org> (raw)
In-Reply-To: <201111250933.39414.marek.vasut@gmail.com>

On Friday 25 November 2011 03:33:39 Marek Vasut wrote:
> > On Thursday 24 November 2011 10:39:21 Matthias Fuchs wrote:
> > > -	sprintf(str, "%08X%04X",
> > > -		*(unsigned int *)&ow_id[0],
> > > -		*(unsigned short *)&ow_id[4]);
> > > +	sprintf(str, "%02X%02X%02X%02X%02X%02X",
> > > +		ow_id[0], ow_id[1], ow_id[2], ow_id[3], ow_id[4], ow_id[5]);
> > 
> > use __get_unaligned_le32 and __get_unaligned_le16 helpers to avoid having
> > to decode each byte.
> 
> Is there any overhead introduced ?

i imagine get_unaligned will be as worse as indexing every byte (which is what 
Matthias is proposing we change to), or as good as the current code (just 
casting the data).  depends on the arch.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111125/ff236d18/attachment.pgp>

  reply	other threads:[~2011-11-25 19:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24 15:39 [U-Boot] [PATCH] board/esd/cpci405/cpci405.c: Fix GCC 4.6 warning Matthias Fuchs
2011-11-24 17:05 ` Marek Vasut
2011-11-24 17:40 ` Mike Frysinger
2011-11-25  8:33   ` Marek Vasut
2011-11-25 19:56     ` Mike Frysinger [this message]
2011-11-25 12:50   ` Matthias Fuchs
2011-12-07 20: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=201111251456.11305.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --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