[PATCH 3/3] powerpc/8xx: xmon compile fix
Michael Ellerman
mpe at ellerman.id.au
Fri May 26 17:24:29 AEST 2017
Nicholas Piggin <npiggin at gmail.com> writes:
> 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();
GCC 7 rejects this:
arch/powerpc/xmon/xmon.c: In function ‘bpt_cmds’:
arch/powerpc/xmon/xmon.c:1252:13: error: statement will never be executed [-Werror=switch-unreachable]
const char badaddr[] = "Only kernel addresses are permitted for breakpoints\n";
^~~~~~~
I'll go back to the earlier version.
cheers
More information about the Linuxppc-dev
mailing list