summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-10-31 11:34:09 +0100
committerPaul Mackerras <paulus@samba.org>2008-10-31 11:34:09 +0100
commitebdba9af940d63e469dc8e46b4aa1fc474e8ee2d (patch)
treeb17fb7f5de11c2604aa764b08ad6930528d3bfaa
parentpowerpc: Fix format string warning in arch/powerpc/boot/main.c (diff)
downloadlinux-ebdba9af940d63e469dc8e46b4aa1fc474e8ee2d.tar.xz
linux-ebdba9af940d63e469dc8e46b4aa1fc474e8ee2d.zip
powerpc: Fix compile errors with CONFIG_BUG=n
This makes sure we don't try to call find_bug or is_warning_bug when CONFIG_BUG=n and CONFIG_XMON=y. Otherwise we get these errors: arch/powerpc/xmon/xmon.c: In function ‘print_bug_trap’: arch/powerpc/xmon/xmon.c:1364: error: implicit declaration of function ‘find_bug’ arch/powerpc/xmon/xmon.c:1364: warning: assignment makes pointer from integer without a cast arch/powerpc/xmon/xmon.c:1367: error: implicit declaration of function ‘is_warning_bug’ arch/powerpc/xmon/xmon.c:1374: error: dereferencing pointer to incomplete type make[2]: *** [arch/powerpc/xmon/xmon.o] Error 1 make[1]: *** [arch/powerpc/xmon] Error 2 make: *** [sub-make] Error 2 Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/xmon/xmon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 34c3d0688fe0..076368c8b8a9 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1353,6 +1353,7 @@ static void backtrace(struct pt_regs *excp)
static void print_bug_trap(struct pt_regs *regs)
{
+#ifdef CONFIG_BUG
const struct bug_entry *bug;
unsigned long addr;
@@ -1373,6 +1374,7 @@ static void print_bug_trap(struct pt_regs *regs)
#else
printf("kernel BUG at %p!\n", (void *)bug->bug_addr);
#endif
+#endif /* CONFIG_BUG */
}
static void excprint(struct pt_regs *fp)