]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc/xmon: Fix compile error with PPC_8xx=y
authorNicholas Piggin <npiggin@gmail.com>
Fri, 12 May 2017 00:47:07 +0000 (10:47 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 30 May 2017 04:59:51 +0000 (14:59 +1000)
Rearrange the code so that mode and badaddr are only defined when
they're used.

Also unsplit the string for easier grepping, and switch from CONFIG_8xx
which is deprecated to CONFIG_PPC_8xx.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/xmon/xmon.c

index f11f65634aab443cd3a6054590075a39af16e885..a728e191961330183df1c53d5158e45ab60ba480 100644 (file)
@@ -1242,14 +1242,14 @@ 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
+       static const char badaddr[] = "Only kernel addresses are permitted for breakpoints\n";
+       int mode;
        case 'd':       /* bd - hardware data breakpoint */
                mode = 7;
                cmd = inchar();