powerpc/8xx: xmon compile fix
Nicholas Piggin
reviewerPATCH 1/1 powerpc/8xx: xmon compile fix
--- arch/powerpc/xmon/xmon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/powerpc/xmon/xmon.c +4 -1
@@ -1213,10 +1213,13 @@ bpt_cmds(void) {int cmd;unsigned long a; -int mode, i; +int i;struct bpt *bp; +#ifndef CONFIG_8xx +int mode;const char badaddr[] ="Only kernel addresses are permitted " "for breakpoints\n" ; +#endif cmd =inchar ();switch (cmd) {
Signature · 1 line
2.10.2
Quoted 10 lines · Nicholas Piggin
Signed-off-by Nicholas Piggin <[email protected]>--- arch/powerpc/xmon/xmon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)arch/powerpc/xmon/xmon.c +0
-0
arch/powerpc/xmon/xmon.c bpt_cmds(void) · line 1218
Quoted 7 lines
arch/powerpc/xmon/xmon.c +2
-1@@ -1213,10 +1213,13 @@ bpt_cmds(void) {int cmd;unsigned long a; -int mode, i; +int i;struct bpt *bp; +#ifndef CONFIG_8xx
CONFIG_8xx is deprecated (ref arch/powerpc/platforms/Kconfig.cputype). CONFIG_PPC_8xx should be used instead.
arch/powerpc/xmon/xmon.c bpt_cmds(void) · line 1219
Quoted 1 line
arch/powerpc/xmon/xmon.c +1
-0+int mode;
You could also have moved this declaration inside the switch {, something like
switch (cmd) {
#ifndef CONFIG_8xx
+ int mode;
case 'd':Christophe
Quoted 7 lines
arch/powerpc/xmon/xmon.c +1
-0const char badaddr[] ="Only kernel addresses are permitted " "for breakpoints\n" ; +#endif cmd =inchar ();switch (cmd) {
Nicholas Piggin
reviewerQuoted 6 lines · On Tue, 29 Nov 2016 10:06:43 +0100 Christophe LEROY <[email protected]>…
Quoted 5 lines · Nicholas Piggin
Signed-off-by Nicholas Piggin <[email protected]>--- arch/powerpc/xmon/xmon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Quoted 15 lines
arch/powerpc/xmon/xmon.c bpt_cmds(void) · line 1218
Quoted 12 lines
arch/powerpc/xmon/xmon.c +2
-1@@ -1213,10 +1213,13 @@ bpt_cmds(void) {int cmd;unsigned long a; -int mode, i; +int i;struct bpt *bp; +#ifndef CONFIG_8xx
CONFIG_8xxis deprecated (refarch/powerpc/platforms/Kconfig.cputype).CONFIG_PPC_8xxshould be used instead.
Thanks for picking that up. Michael, can you adjust it if you merge please?
Quoted 5 lines
arch/powerpc/xmon/xmon.c bpt_cmds(void) · line 1219
Quoted 2 lines
arch/powerpc/xmon/xmon.c +1
-0+int mode;You could also have moved this declaration inside the switch {, something like
I tried that, couldn't decide that it was better (you also need badaddr).
Thanks,
Nick
Michael Ellerman
reviewerQuoted 1 line · Nicholas Piggin
Signed-off-by Nicholas Piggin <[email protected]>
What's the actual error? mode/badaddr defined but not used?
I'm just curious why I've never hit it?
cheers
Quoted 21 lines
arch/powerpc/xmon/xmon.c +4
-1@@ -1213,10 +1213,13 @@ bpt_cmds(void) {int cmd;unsigned long a; -int mode, i; +int i;struct bpt *bp; +#ifndef CONFIG_8xx +int mode;const char badaddr[] ="Only kernel addresses are permitted " "for breakpoints\n" ; +#endif cmd =inchar ();switch (cmd) {Signature · 1 line
2.10.2
Nicholas Piggin
reviewerQuoted 7 lines · On Wed, 30 Nov 2016 19:00:57 +1100 Michael Ellerman <[email protected]> wrote:
Quoted 1 line · Nicholas Piggin
Signed-off-by Nicholas Piggin <[email protected]>What's the actual error? mode/badaddr defined but not used?
I'm just curious why I've never hit it?
Yes exactly. I'm not sure why you wouldn't have seen it. I'm using powerpc64 compiler to build 32-bit, but I don't think that should make a difference for this warning.
Thanks,
Nick