Commit 4896cef8e33e668734234543afb58eb171476ff3
Committed by
Linus Torvalds
1 parent
5e8b1c4083
Exists in
master
and in
7 other branches
[PATCH] s390: BUG() warnings
Use __builtin_trap instead of an inline assembly in the BUG() macro. That way the compiler knows that BUG() won't return. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
include/asm-s390/bug.h
... | ... | @@ -4,9 +4,10 @@ |
4 | 4 | #include <linux/kernel.h> |
5 | 5 | |
6 | 6 | #ifdef CONFIG_BUG |
7 | + | |
7 | 8 | #define BUG() do { \ |
8 | - printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | |
9 | - __asm__ __volatile__(".long 0"); \ | |
9 | + printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | |
10 | + __builtin_trap(); \ | |
10 | 11 | } while (0) |
11 | 12 | |
12 | 13 | #define HAVE_ARCH_BUG |