[U-Boot] input: fix unaligned access in key_matrix_decode_fdt()

Tom Rini trini at ti.com
Wed Jun 5 14:34:20 CEST 2013


On Wed, May 22, 2013 at 08:48:18AM -0000, Stephen Warren wrote:

> From: Stephen Warren <swarren at nvidia.com>
> 
> Initialized character arrays on the stack can cause gcc to emit code that
> performs unaligned accessess. Make the data static to avoid this.
> 
> Note that the unaligned accesses are made when copying data to prefix[] on
> the stack from .rodata. By making the data static, the copy is completely
> avoided. All explicitly written code treats the data as u8[], so will never
> cause any unaligned accesses.
> 
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> Acked-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130605/c703b9da/attachment.pgp>


More information about the U-Boot mailing list