Commit 9a523d42 authored by David Howells's avatar David Howells Committed by Linus Torvalds

FRV: Stop gcc from generating uninitialised variable warnings after BUG()

Stop gcc from generating uninitialised variable warnings after BUG().
The problem is that FRV's call into its gdbstub appears to return (if
the function is marked noreturn, then the compiler is under no
obligation to pass it a return address, and so GDB won't know where the
bug happened).

To get around this, we make the do...while wrapper in _debug_bug_trap()
an endless loop from which there's no escape.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e37469f6
...@@ -30,7 +30,7 @@ extern void __debug_bug_printk(const char *file, unsigned line); ...@@ -30,7 +30,7 @@ extern void __debug_bug_printk(const char *file, unsigned line);
do { \ do { \
__debug_bug_trap(signr); \ __debug_bug_trap(signr); \
asm volatile("nop"); \ asm volatile("nop"); \
} while(0) } while(1)
#define HAVE_ARCH_BUG #define HAVE_ARCH_BUG
#define BUG() \ #define BUG() \
...@@ -46,7 +46,8 @@ do { \ ...@@ -46,7 +46,8 @@ do { \
#define HAVE_ARCH_KGDB_BAD_PAGE #define HAVE_ARCH_KGDB_BAD_PAGE
#define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0) #define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0)
#endif #endif
#endif
#endif /* CONFIG_BUG */
#include <asm-generic/bug.h> #include <asm-generic/bug.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment