[PATCH] powerpc/8xx: xmon compile fix
Subsystems:
linux for powerpc (32-bit and 64-bit) , the rest
STALE3539d
5 messages,
3 authors,
2016-11-30 · open the first message on its own page
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 7605455..435f5f5 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c @@ -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 ) { --
2.10.2
Le 29/11/2016 à 09:56, Nicholas Piggin a écrit : quoted hunk 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 7605455..435f5f5 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c @@ -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.
+ int mode;
You could also have moved this declaration inside the switch {,
something like
switch (cmd) {
#ifndef CONFIG_8xx
+ int mode;
case 'd':
Christophe
const char badaddr[] = "Only kernel addresses are permitted "
"for breakpoints\n";
+#endif
cmd = inchar();
switch (cmd) {
On Tue, 29 Nov 2016 10:06:43 +0100
Christophe LEROY [off-list ref] wrote:
Le 29/11/2016 à 09:56, Nicholas Piggin a écrit : quoted 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 7605455..435f5f5 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c @@ -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.
Thanks for picking that up. Michael, can you adjust it if you merge
please?
quoted + 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
Nicholas Piggin [off-list ref] writes:
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
What's the actual error? mode/badaddr defined but not used?
I'm just curious why I've never hit it?
cheers
quoted hunk diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 7605455..435f5f5 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c @@ -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 ) { --
2.10.2
On Wed, 30 Nov 2016 19:00:57 +1100
Michael Ellerman [off-list ref] wrote:
Nicholas Piggin [off-list ref] writes:
quoted Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
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