Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2
+2
arch/powerpc/xmon/xmon.c
··· 1353 1353 1354 1354 static void print_bug_trap(struct pt_regs *regs) 1355 1355 { 1356 + #ifdef CONFIG_BUG 1356 1357 const struct bug_entry *bug; 1357 1358 unsigned long addr; 1358 1359 ··· 1374 1373 #else 1375 1374 printf("kernel BUG at %p!\n", (void *)bug->bug_addr); 1376 1375 #endif 1376 + #endif /* CONFIG_BUG */ 1377 1377 } 1378 1378 1379 1379 static void excprint(struct pt_regs *fp)