Skip to contentSkip to conversation

m68k: fix some compiler warnings when building for DragonBall

PATCH Superseded Daniel Palmer 3 participants 6 messages Apr 5, 2014 – Apr 8, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 m68k: fix some compiler warnings when building for DragonBall

---
 arch/m68k/kernel/setup_no.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
arch/m68k/kernel/setup_no.c +6 -7
index 5b16f5d..88c27d9 100644
@@ -58,17 +58,16 @@ void (*mach_halt)(void);
 void (*mach_power_off)(void);
 
 #ifdef CONFIG_M68000
-#define CPU_NAME	"MC68000"
-#endif
-#ifdef CONFIG_M68328
+#if defined(CONFIG_M68328)
 #define CPU_NAME	"MC68328"
-#endif
-#ifdef CONFIG_M68EZ328
+#elif defined(CONFIG_M68EZ328)
 #define CPU_NAME	"MC68EZ328"
-#endif
-#ifdef CONFIG_M68VZ328
+#elif defined(CONFIG_M68VZ328)
 #define CPU_NAME	"MC68VZ328"
+#else
+#define CPU_NAME	"MC68000"
 #endif
+#endif /* CONFIG_M68000 */
 #ifdef CONFIG_M68360
 #define CPU_NAME	"MC68360"
 #endif
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 m68k: Only allow for one member of the DragonBall family to be selected in Kconfig. The support code for these chips doesn't currently handle support for multiple family members to be supported in a single kernel image.

---
 arch/m68k/Kconfig.cpu | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
arch/m68k/Kconfig.cpu +9 -7
index 33013df..1ca7cbe 100644
@@ -93,27 +93,29 @@ config M68060
 	  If you anticipate running this kernel on a computer with a MC68060
 	  processor, say Y. Otherwise, say N.
 
+choice
+	prompt "DragonBall SoC family support"
+	depends on M68000
+	help
+	  Select which member of the DragonBall SoC family to support.
+
 config M68328
 	bool "MC68328"
-	depends on !MMU
-	select M68000
 	help
 	  Motorola 68328 processor support.
 
 config M68EZ328
 	bool "MC68EZ328"
-	depends on !MMU
-	select M68000
 	help
-	  Motorola 68EX328 processor support.
+	  Motorola 68EZ328 processor support.
 
 config M68VZ328
 	bool "MC68VZ328"
-	depends on !MMU
-	select M68000
 	help
 	  Motorola 68VZ328 processor support.
 
+endchoice
+
 config M68360
 	bool "MC68360"
 	depends on !MMU
Signature · 1 line
1.9.1
#2 lore raw
In reply to Daniel Palmer

Hi Daniel,

Thanks for your patch!

Can you please show the compiler warnings in the description? That helps reviewers, and will make this patch show up if someone searches for the compiler warnings using e.g. Google.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvald

#3 lore raw

Sure, it's just GCC complaining that the CPU name has already been defined. It's minor :)

#4 lore raw

PATCH v2 1/2 m68k: fix a compiler warning when building for DragonBall

In reply to Daniel Palmer

In file included from arch/m68k/kernel/setup.c:4:0:
arch/m68k/kernel/setup_no.c:70:0: warning: "CPU_NAME" redefined [enabled by default]
#define CPU_NAME "MC68VZ328"
^
arch/m68k/kernel/setup_no.c:61:0: note: this is the location of the previous definition
#define CPU_NAME "MC68000"
^

---
 arch/m68k/kernel/setup_no.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
arch/m68k/kernel/setup_no.c +6 -7
index 5b16f5d..88c27d9 100644
@@ -58,17 +58,16 @@ void (*mach_halt)(void);
 void (*mach_power_off)(void);
 
 #ifdef CONFIG_M68000
-#define CPU_NAME	"MC68000"
-#endif
-#ifdef CONFIG_M68328
+#if defined(CONFIG_M68328)
 #define CPU_NAME	"MC68328"
-#endif
-#ifdef CONFIG_M68EZ328
+#elif defined(CONFIG_M68EZ328)
 #define CPU_NAME	"MC68EZ328"
-#endif
-#ifdef CONFIG_M68VZ328
+#elif defined(CONFIG_M68VZ328)
 #define CPU_NAME	"MC68VZ328"
+#else
+#define CPU_NAME	"MC68000"
 #endif
+#endif /* CONFIG_M68000 */
 #ifdef CONFIG_M68360
 #define CPU_NAME	"MC68360"
 #endif
Signature · 1 line
1.9.1
#5 lore raw

Re: [PATCH v2 1/2] m68k: fix a compiler warning when building for DragonBall

Hi Daniel,

Quoted 9 lines · Daniel Palmer

In file included from arch/m68k/kernel/setup.c:4:0:
arch/m68k/kernel/setup_no.c:70:0: warning: "CPU_NAME" redefined [enabled by default]
#define CPU_NAME "MC68VZ328"
^
arch/m68k/kernel/setup_no.c:61:0: note: this is the location of the previous definition
#define CPU_NAME "MC68000"
^

Thanks, I'll add this to the m68knommu git tree.

Regards
Greg

Quoted 32 lines
 arch/m68k/kernel/setup_no.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
arch/m68k/kernel/setup_no.c +6 -7
index 5b16f5d..88c27d9 100644
@@ -58,17 +58,16 @@ void (*mach_halt)(void);
 void (*mach_power_off)(void);
 
 #ifdef CONFIG_M68000
-#define CPU_NAME	"MC68000"
-#endif
-#ifdef CONFIG_M68328
+#if defined(CONFIG_M68328)
 #define CPU_NAME	"MC68328"
-#endif
-#ifdef CONFIG_M68EZ328
+#elif defined(CONFIG_M68EZ328)
 #define CPU_NAME	"MC68EZ328"
-#endif
-#ifdef CONFIG_M68VZ328
+#elif defined(CONFIG_M68VZ328)
 #define CPU_NAME	"MC68VZ328"
+#else
+#define CPU_NAME	"MC68000"
 #endif
+#endif /* CONFIG_M68000 */
 #ifdef CONFIG_M68360
 #define CPU_NAME	"MC68360"
 #endif