Skip to content

Commit

Permalink
[PATCH] s390: BUG() warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin Schwidefsky authored and Linus Torvalds committed Mar 24, 2006
1 parent 5e8b1c4 commit 4896cef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/asm-s390/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
#include <linux/kernel.h>

#ifdef CONFIG_BUG

#define BUG() do { \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
__asm__ __volatile__(".long 0"); \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
__builtin_trap(); \
} while (0)

#define HAVE_ARCH_BUG
Expand Down

0 comments on commit 4896cef

Please sign in to comment.