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

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

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-05-26 07:24:29

Nicholas Piggin [off-list ref] writes:
quoted hunk ↗ jump to hunk
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[] =3D "Only kernel addresses are permitted "
-		"for breakpoints\n";
=20=20
 	cmd =3D inchar();
 	switch (cmd) {
-#ifndef CONFIG_8xx
+#ifndef CONFIG_PPC_8xx
+	int mode;
+	const char badaddr[] =3D "Only kernel addresses are permitted "
+		"for breakpoints\n";
+
 	case 'd':	/* bd - hardware data breakpoint */
 		mode =3D 7;
 		cmd =3D inchar();
GCC 7 rejects this:

  arch/powerpc/xmon/xmon.c: In function =E2=80=98bpt_cmds=E2=80=99:
  arch/powerpc/xmon/xmon.c:1252:13: error: statement will never be executed=
 [-Werror=3Dswitch-unreachable]
    const char badaddr[] =3D "Only kernel addresses are permitted for break=
points\n";
               ^~~~~~~

I'll go back to the earlier version.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help