From: Mike Frysinger Date: Fri, 25 Nov 2011 14:56:10 -0500 Subject: [U-Boot] [PATCH] board/esd/cpci405/cpci405.c: Fix GCC 4.6 warning In-Reply-To: <201111250933.39414.marek.vasut@gmail.com> References: <4ECE6529.8050307@esd.eu> <201111241240.04413.vapier@gentoo.org> <201111250933.39414.marek.vasut@gmail.com> Message-ID: <201111251456.11305.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: