summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/arm926ejs/orion5x
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-10-09 09:28:15 +0000
committerTom Rini <trini@ti.com>2012-10-15 11:53:07 -0700
commitb823fd9ba56d56e3cbb5b05e7a4815fb0914204a (patch)
treeb93f7f8ba2874cd0478aee2f96718aedf4031ce7 /arch/arm/cpu/arm926ejs/orion5x
parent6528ff0109d81c1f21d20f9f1370782bccf87bcb (diff)
downloadtalos-obmc-uboot-b823fd9ba56d56e3cbb5b05e7a4815fb0914204a.tar.gz
talos-obmc-uboot-b823fd9ba56d56e3cbb5b05e7a4815fb0914204a.zip
ARM: prevent misaligned array inits
Under option -munaligned-access, gcc can perform local char or 16-bit array initializations using misaligned native accesses which will throw a data abort exception. Fix files where these array initializations were unneeded, and for files known to contain such initializations, enforce gcc option -mno-unaligned-access. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> [trini: Switch to usign call cc-option for -mno-unaligned-access as Albert had done previously as that's really correct] Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/orion5x')
-rw-r--r--arch/arm/cpu/arm926ejs/orion5x/cpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/cpu/arm926ejs/orion5x/cpu.c b/arch/arm/cpu/arm926ejs/orion5x/cpu.c
index c3948d38f0..5a4775ab6f 100644
--- a/arch/arm/cpu/arm926ejs/orion5x/cpu.c
+++ b/arch/arm/cpu/arm926ejs/orion5x/cpu.c
@@ -194,8 +194,8 @@ u32 orion5x_device_rev(void)
*/
int print_cpuinfo(void)
{
- char dev_str[] = "0x0000";
- char rev_str[] = "0x00";
+ char dev_str[7]; /* room enough for 0x0000 plus null byte */
+ char rev_str[5]; /* room enough for 0x00 plus null byte */
char *dev_name = NULL;
char *rev_name = NULL;
OpenPOWER on IntegriCloud