From 44442c13ba2f63a67664ab5cc7ce6c2fe009e4a0 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 6 Nov 2014 14:03:03 +0100 Subject: board/renesas/ecovec/ecovec.c: fix buffer overflow Fix error detected by cppcheck: [board/renesas/ecovec/ecovec.c:66]: (error) Buffer is accessed out of bounds. Signed-off-by: Wolfgang Denk Cc: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/ecovec/ecovec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/renesas/ecovec/ecovec.c b/board/renesas/ecovec/ecovec.c index 2804d9133da..d862d997e56 100644 --- a/board/renesas/ecovec/ecovec.c +++ b/board/renesas/ecovec/ecovec.c @@ -41,7 +41,7 @@ static void debug_led(u8 led) int board_late_init(void) { u8 mac[6]; - char env_mac[17]; + char env_mac[18]; udelay(1000); -- cgit v1.2.3 From 887363b5f0441b8ec22b586ac77df4bf5a1b09f1 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 6 Nov 2014 15:55:22 +0900 Subject: sh: consolidate CONFIG_SYS_CPU defines Now each board selects one of CONFIG_CPU_SH2, CONFIG_CPU_SH3, CONFIG_CPU_SH4, so let's move CONFIG_SYS_CPU definition to arch/sh/Kconfig. Signed-off-by: Masahiro Yamada Cc: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- arch/sh/Kconfig | 11 ++++++++--- board/alphaproject/ap_sh4a_4a/Kconfig | 3 --- board/espt/Kconfig | 3 --- board/mpr2/Kconfig | 3 --- board/ms7720se/Kconfig | 3 --- board/ms7722se/Kconfig | 3 --- board/ms7750se/Kconfig | 3 --- board/renesas/MigoR/Kconfig | 3 --- board/renesas/ap325rxa/Kconfig | 3 --- board/renesas/ecovec/Kconfig | 3 --- board/renesas/r0p7734/Kconfig | 3 --- board/renesas/r2dplus/Kconfig | 3 --- board/renesas/r7780mp/Kconfig | 3 --- board/renesas/rsk7203/Kconfig | 3 --- board/renesas/rsk7264/Kconfig | 3 --- board/renesas/rsk7269/Kconfig | 3 --- board/renesas/sh7752evb/Kconfig | 3 --- board/renesas/sh7753evb/Kconfig | 3 --- board/renesas/sh7757lcr/Kconfig | 3 --- board/renesas/sh7763rdp/Kconfig | 3 --- board/renesas/sh7785lcr/Kconfig | 3 --- board/shmin/Kconfig | 3 --- 22 files changed, 8 insertions(+), 66 deletions(-) (limited to 'board') diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 49b00da8fb0..a77e6f9c07d 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -1,9 +1,6 @@ menu "SuperH architecture" depends on SH -config SYS_ARCH - default "sh" - config CPU_SH2 bool @@ -110,6 +107,14 @@ config TARGET_SH7785LCR endchoice +config SYS_ARCH + default "sh" + +config SYS_CPU + default "sh2" if CPU_SH2 + default "sh3" if CPU_SH3 + default "sh4" if CPU_SH4 + source "board/alphaproject/ap_sh4a_4a/Kconfig" source "board/espt/Kconfig" source "board/mpr2/Kconfig" diff --git a/board/alphaproject/ap_sh4a_4a/Kconfig b/board/alphaproject/ap_sh4a_4a/Kconfig index 2352e668069..4692851b268 100644 --- a/board/alphaproject/ap_sh4a_4a/Kconfig +++ b/board/alphaproject/ap_sh4a_4a/Kconfig @@ -1,8 +1,5 @@ if TARGET_AP_SH4A_4A -config SYS_CPU - default "sh4" - config SYS_BOARD default "ap_sh4a_4a" diff --git a/board/espt/Kconfig b/board/espt/Kconfig index 6c7cd241550..0294926cf5b 100644 --- a/board/espt/Kconfig +++ b/board/espt/Kconfig @@ -1,8 +1,5 @@ if TARGET_ESPT -config SYS_CPU - default "sh4" - config SYS_BOARD default "espt" diff --git a/board/mpr2/Kconfig b/board/mpr2/Kconfig index 79a60c2f2d9..54176e8f6f2 100644 --- a/board/mpr2/Kconfig +++ b/board/mpr2/Kconfig @@ -1,8 +1,5 @@ if TARGET_MPR2 -config SYS_CPU - default "sh3" - config SYS_BOARD default "mpr2" diff --git a/board/ms7720se/Kconfig b/board/ms7720se/Kconfig index d935affdd9d..83313279b3b 100644 --- a/board/ms7720se/Kconfig +++ b/board/ms7720se/Kconfig @@ -1,8 +1,5 @@ if TARGET_MS7720SE -config SYS_CPU - default "sh3" - config SYS_BOARD default "ms7720se" diff --git a/board/ms7722se/Kconfig b/board/ms7722se/Kconfig index 17073e81e91..39027c9864f 100644 --- a/board/ms7722se/Kconfig +++ b/board/ms7722se/Kconfig @@ -1,8 +1,5 @@ if TARGET_MS7722SE -config SYS_CPU - default "sh4" - config SYS_BOARD default "ms7722se" diff --git a/board/ms7750se/Kconfig b/board/ms7750se/Kconfig index 07aa0247b7e..2c0b88c7753 100644 --- a/board/ms7750se/Kconfig +++ b/board/ms7750se/Kconfig @@ -1,8 +1,5 @@ if TARGET_MS7750SE -config SYS_CPU - default "sh4" - config SYS_BOARD default "ms7750se" diff --git a/board/renesas/MigoR/Kconfig b/board/renesas/MigoR/Kconfig index 10dffeda9f6..25b170ac071 100644 --- a/board/renesas/MigoR/Kconfig +++ b/board/renesas/MigoR/Kconfig @@ -1,8 +1,5 @@ if TARGET_MIGOR -config SYS_CPU - default "sh4" - config SYS_BOARD default "MigoR" diff --git a/board/renesas/ap325rxa/Kconfig b/board/renesas/ap325rxa/Kconfig index 45bd6003bd9..c8f2de29592 100644 --- a/board/renesas/ap325rxa/Kconfig +++ b/board/renesas/ap325rxa/Kconfig @@ -1,8 +1,5 @@ if TARGET_AP325RXA -config SYS_CPU - default "sh4" - config SYS_BOARD default "ap325rxa" diff --git a/board/renesas/ecovec/Kconfig b/board/renesas/ecovec/Kconfig index a24fe911e08..08cde833562 100644 --- a/board/renesas/ecovec/Kconfig +++ b/board/renesas/ecovec/Kconfig @@ -1,8 +1,5 @@ if TARGET_ECOVEC -config SYS_CPU - default "sh4" - config SYS_BOARD default "ecovec" diff --git a/board/renesas/r0p7734/Kconfig b/board/renesas/r0p7734/Kconfig index bda785dc97c..7f24f41b8f8 100644 --- a/board/renesas/r0p7734/Kconfig +++ b/board/renesas/r0p7734/Kconfig @@ -1,8 +1,5 @@ if TARGET_R0P7734 -config SYS_CPU - default "sh4" - config SYS_BOARD default "r0p7734" diff --git a/board/renesas/r2dplus/Kconfig b/board/renesas/r2dplus/Kconfig index c55c109f6b0..6597870a86e 100644 --- a/board/renesas/r2dplus/Kconfig +++ b/board/renesas/r2dplus/Kconfig @@ -1,8 +1,5 @@ if TARGET_R2DPLUS -config SYS_CPU - default "sh4" - config SYS_BOARD default "r2dplus" diff --git a/board/renesas/r7780mp/Kconfig b/board/renesas/r7780mp/Kconfig index 2d3cbeca5b8..050cc4cc0f6 100644 --- a/board/renesas/r7780mp/Kconfig +++ b/board/renesas/r7780mp/Kconfig @@ -1,8 +1,5 @@ if TARGET_R7780MP -config SYS_CPU - default "sh4" - config SYS_BOARD default "r7780mp" diff --git a/board/renesas/rsk7203/Kconfig b/board/renesas/rsk7203/Kconfig index 5eb2923fb9a..10b8786411f 100644 --- a/board/renesas/rsk7203/Kconfig +++ b/board/renesas/rsk7203/Kconfig @@ -1,8 +1,5 @@ if TARGET_RSK7203 -config SYS_CPU - default "sh2" - config SYS_BOARD default "rsk7203" diff --git a/board/renesas/rsk7264/Kconfig b/board/renesas/rsk7264/Kconfig index af71295a259..755d2896fb1 100644 --- a/board/renesas/rsk7264/Kconfig +++ b/board/renesas/rsk7264/Kconfig @@ -1,8 +1,5 @@ if TARGET_RSK7264 -config SYS_CPU - default "sh2" - config SYS_BOARD default "rsk7264" diff --git a/board/renesas/rsk7269/Kconfig b/board/renesas/rsk7269/Kconfig index cc0092c2fbb..ab5cd0e38fe 100644 --- a/board/renesas/rsk7269/Kconfig +++ b/board/renesas/rsk7269/Kconfig @@ -1,8 +1,5 @@ if TARGET_RSK7269 -config SYS_CPU - default "sh2" - config SYS_BOARD default "rsk7269" diff --git a/board/renesas/sh7752evb/Kconfig b/board/renesas/sh7752evb/Kconfig index 7c6aae94bf4..7f40888336e 100644 --- a/board/renesas/sh7752evb/Kconfig +++ b/board/renesas/sh7752evb/Kconfig @@ -1,8 +1,5 @@ if TARGET_SH7752EVB -config SYS_CPU - default "sh4" - config SYS_BOARD default "sh7752evb" diff --git a/board/renesas/sh7753evb/Kconfig b/board/renesas/sh7753evb/Kconfig index 8abdea0b13a..be889248a8e 100644 --- a/board/renesas/sh7753evb/Kconfig +++ b/board/renesas/sh7753evb/Kconfig @@ -1,8 +1,5 @@ if TARGET_SH7753EVB -config SYS_CPU - default "sh4" - config SYS_BOARD default "sh7753evb" diff --git a/board/renesas/sh7757lcr/Kconfig b/board/renesas/sh7757lcr/Kconfig index 97d966feb2a..3fba80ddcab 100644 --- a/board/renesas/sh7757lcr/Kconfig +++ b/board/renesas/sh7757lcr/Kconfig @@ -1,8 +1,5 @@ if TARGET_SH7757LCR -config SYS_CPU - default "sh4" - config SYS_BOARD default "sh7757lcr" diff --git a/board/renesas/sh7763rdp/Kconfig b/board/renesas/sh7763rdp/Kconfig index d5129881387..101d2b5a32e 100644 --- a/board/renesas/sh7763rdp/Kconfig +++ b/board/renesas/sh7763rdp/Kconfig @@ -1,8 +1,5 @@ if TARGET_SH7763RDP -config SYS_CPU - default "sh4" - config SYS_BOARD default "sh7763rdp" diff --git a/board/renesas/sh7785lcr/Kconfig b/board/renesas/sh7785lcr/Kconfig index 15787e645e4..e204c76ef56 100644 --- a/board/renesas/sh7785lcr/Kconfig +++ b/board/renesas/sh7785lcr/Kconfig @@ -1,8 +1,5 @@ if TARGET_SH7785LCR -config SYS_CPU - default "sh4" - config SYS_BOARD default "sh7785lcr" diff --git a/board/shmin/Kconfig b/board/shmin/Kconfig index a1c383e1b2c..467580c67b9 100644 --- a/board/shmin/Kconfig +++ b/board/shmin/Kconfig @@ -1,8 +1,5 @@ if TARGET_SHMIN -config SYS_CPU - default "sh3" - config SYS_BOARD default "shmin" -- cgit v1.2.3