[LV] [PATCH] bug.h: Make HAVE_ARCH_BUG depend on CONFIG_BUG
With CONFIG_BUG undefined BUG() is meant to expand to nil. For this the generic version is good enough. While at it fix formatting and make the message output consistent with the generic version. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> --- Please apply. Maciej patch-mips-2.6.23-rc5-20070904-vax-bug-1 diff -up --recursive --new-file linux-mips-2.6.23-rc5-20070904.macro/include/asm-vax/bug.h linux-mips-2.6.23-rc5-20070904/include/asm-vax/bug.h --- linux-mips-2.6.23-rc5-20070904.macro/include/asm-vax/bug.h 2007-09-09 00:00:00.000000000 +0000 +++ linux-mips-2.6.23-rc5-20070904/include/asm-vax/bug.h 2007-09-09 19:40:33.000000000 +0000 @@ -1,15 +1,18 @@ #ifndef _ASMVAX_BUG_H #define _ASMVAX_BUG_H -#define HAVE_ARCH_BUG +#ifdef CONFIG_BUG +#define HAVE_ARCH_BUG #define BUG() do { \ - printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ - __asm__ __volatile__("bugw $0"); \ + printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \ + __asm__ __volatile__("bugw $0"); \ } while (0) +#endif /* CONFIG_BUG */ + #define PAGE_BUG(page) do { \ - BUG(); \ + BUG(); \ } while (0) #include <asm-generic/bug.h> _______________________________________________ Linux-Vax mailing list Linux-Vax@pergamentum.com http://www.pergamentum.com/mailman/listinfo/linux-vax
Teilnehmer (2)
-
Jan-Benedict Glaw
-
Maciej W. Rozycki