From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Tue, 04 Jun 2013 13:29:24 -0600 Subject: [U-Boot] [PATCH] input: fix unaligned access in key_matrix_decode_fdt() In-Reply-To: <1369248498-1799-1-git-send-email-swarren@wwwdotorg.org> References: <1369248498-1799-1-git-send-email-swarren@wwwdotorg.org> Message-ID: <51AE4014.10808@wwwdotorg.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 05/22/2013 12:48 PM, Stephen Warren wrote: > From: Stephen Warren > > 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.