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

Stephen Warren
2013-06-04T19:29:24Z

On 05/22/2013 12:48 PM, Stephen Warren wrote:
> From: Stephen Warren <swarren@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.

Tom, does this patch look good?

The discussion following it was unrelated to this patch, but rather
related to pre-processing of device-trees, so I don't think should
prevent this patch being merged.