From: David Howells Date: Mon, 27 Apr 2009 10:55:23 +0000 (+0100) Subject: FRV: Stop gcc from generating uninitialised variable warnings after BUG() X-Git-Tag: firefly_0821_release~14318 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9a523d427dc5908a79ce3ff742e9606e852802d6;p=firefly-linux-kernel-4.4.55.git 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: David Howells Signed-off-by: Linus Torvalds --- diff --git a/arch/frv/include/asm/bug.h b/arch/frv/include/asm/bug.h index 6b1b44d71028..2e054508a2f6 100644 --- a/arch/frv/include/asm/bug.h +++ b/arch/frv/include/asm/bug.h @@ -30,7 +30,7 @@ extern void __debug_bug_printk(const char *file, unsigned line); do { \ __debug_bug_trap(signr); \ asm volatile("nop"); \ -} while(0) +} while(1) #define HAVE_ARCH_BUG #define BUG() \ @@ -46,7 +46,8 @@ do { \ #define HAVE_ARCH_KGDB_BAD_PAGE #define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0) #endif -#endif + +#endif /* CONFIG_BUG */ #include