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 <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
eb4db450aa
commit
e8006b060f
@@ -7,7 +7,7 @@
|
|||||||
#ifndef CONFIG_SUN3
|
#ifndef CONFIG_SUN3
|
||||||
#define BUG() do { \
|
#define BUG() do { \
|
||||||
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
|
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
|
||||||
asm volatile("illegal"); \
|
__builtin_trap(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
#else
|
||||||
#define BUG() do { \
|
#define BUG() do { \
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define BUG() do { \
|
#define BUG() do { \
|
||||||
asm volatile("illegal"); \
|
__builtin_trap(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user