From: Josh Poimboeuf Date: Tue, 28 Feb 2017 04:21:16 +0000 (-0600) Subject: objtool: Enclose contents of unreachable() macro in a block X-Git-Tag: v4.14-rc1~1392^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e4636cf981b5b629fbfb78aa9f232e015f7d521;p=platform%2Fkernel%2Flinux-rpi3.git objtool: Enclose contents of unreachable() macro in a block Guenter Roeck reported a boot failure in mips64. It was bisected to the following commit: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends") The unreachable() macro was formerly only composed of a single statement. The above commit added a second statement, but neglected to enclose the statements in a block. Suggested-by: Guenter Roeck Reported-by: Guenter Roeck Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends") Link: http://lkml.kernel.org/r/20170228042116.glmwmwiohcix7o4a@treble Signed-off-by: Ingo Molnar --- diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index de47134..f457b52 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -215,7 +215,8 @@ * this in the preprocessor, but we can live with this because they're * unreleased. Really, we need to have autoconf for the kernel. */ -#define unreachable() annotate_unreachable(); __builtin_unreachable() +#define unreachable() \ + do { annotate_unreachable(); __builtin_unreachable(); } while (0) /* Mark a function definition as prohibited from being cloned. */ #define __noclone __attribute__((__noclone__, __optimize__("no-tracer")))