Thread (16 messages) 16 messages, 6 authors, 2017-05-30

Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2017-05-12 00:47:23
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Michael Ellerman, Linus Torvalds

On Thu, 11 May 2017 20:52:56 +0200
christophe leroy [off-list ref] wrote:
Le 11/05/2017 à 19:14, christophe leroy a écrit :
quoted

Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :  
quoted
Cc: Scott Wood <oss@buserror.net>
Cc: Christophe Leroy <redacted>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/xmon/xmon.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index f11f65634aab..ec420b0e6e88 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1242,10 +1242,13 @@ bpt_cmds(void)
 {
     int cmd;
     unsigned long a;
-    int mode, i;
+    int i;
     struct bpt *bp;
+#ifndef CONFIG_8xx  
Would be better to use CONFIG_PPC_8xx

As stated in arch/powerpc/platform/Kconfig.cputype, CONFIG_8xx is temp
to handle compat with arch/ppc, and we are trying to get rid of it  
I had the same comment in https://patchwork.ozlabs.org/patch/700354/
I also suggested to move the relevant declarations inside the switch()
How's this one?

---
 arch/powerpc/xmon/xmon.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index f11f65634aab..438fdb0fb142 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1242,14 +1242,16 @@ bpt_cmds(void)
 {
 	int cmd;
 	unsigned long a;
-	int mode, i;
+	int i;
 	struct bpt *bp;
-	const char badaddr[] = "Only kernel addresses are permitted "
-		"for breakpoints\n";
 
 	cmd = inchar();
 	switch (cmd) {
-#ifndef CONFIG_8xx
+#ifndef CONFIG_PPC_8xx
+	int mode;
+	const char badaddr[] = "Only kernel addresses are permitted "
+		"for breakpoints\n";
+
 	case 'd':	/* bd - hardware data breakpoint */
 		mode = 7;
 		cmd = inchar();
-- 
2.11.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help