From: Geert Uytterhoeven Date: Sun, 18 May 2008 18:47:12 +0000 (+0200) Subject: m68k: Make gcc aware that BUG() does not return X-Git-Tag: v2.6.26-rc3~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8006b060f3982a969c5170aa869628d54dd30d8;p=linux-2.6 m68k: Make gcc aware that BUG() does not return Use `__builtin_trap()' instead of `asm volatile("illegal")' in the m68k BUG() macros (as suggested by Andrew Pinski), to kill warnings in code that assumes BUG() does not return. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds --- diff --git a/include/asm-m68k/bug.h b/include/asm-m68k/bug.h index 7b60776cc9..e5b528deb8 100644 --- a/include/asm-m68k/bug.h +++ b/include/asm-m68k/bug.h @@ -7,7 +7,7 @@ #ifndef CONFIG_SUN3 #define BUG() do { \ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ - asm volatile("illegal"); \ + __builtin_trap(); \ } while (0) #else #define BUG() do { \ @@ -17,7 +17,7 @@ #endif #else #define BUG() do { \ - asm volatile("illegal"); \ + __builtin_trap(); \ } while (0) #endif