From: Daniel Santos Date: Fri, 22 Feb 2013 00:41:44 +0000 (-0800) Subject: bug.h: fix BUILD_BUG_ON macro in __CHECKER__ X-Git-Tag: MMI-PSA29.97-13-9~14988^2~158 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca623c914e82c3351cd657073fdb24a1df8c27b9;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git bug.h: fix BUILD_BUG_ON macro in __CHECKER__ When __CHECKER__ is defined, we disable all of the BUILD_BUG.* macros. However, both BUILD_BUG_ON_NOT_POWER_OF_2 and BUILD_BUG_ON was evaluating to nothing in this case, and we want (0) since this is a function-like macro that will be followed by a semicolon. Signed-off-by: Daniel Santos Acked-by: Borislav Petkov Cc: Andi Kleen Cc: David Rientjes Cc: Joe Perches Cc: Josh Triplett Cc: Paul Gortmaker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/bug.h b/include/linux/bug.h index 2a11774c5e64..27d404f91b3e 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -12,11 +12,11 @@ enum bug_trap_type { struct pt_regs; #ifdef __CHECKER__ -#define BUILD_BUG_ON_NOT_POWER_OF_2(n) +#define BUILD_BUG_ON_NOT_POWER_OF_2(n) (0) #define BUILD_BUG_ON_ZERO(e) (0) #define BUILD_BUG_ON_NULL(e) ((void*)0) #define BUILD_BUG_ON_INVALID(e) (0) -#define BUILD_BUG_ON(condition) +#define BUILD_BUG_ON(condition) (0) #define BUILD_BUG() (0) #else /* __CHECKER__ */