From: Dr. David Alan Gilbert Date: Wed, 15 Jun 2011 22:08:27 +0000 (-0700) Subject: BUILD_BUG_ON_ZERO: fix sparse breakage X-Git-Tag: v3.0-rc4~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca39599c633fb02aceac31a7e67563612e4fe347;p=thirdparty%2Flinux.git BUILD_BUG_ON_ZERO: fix sparse breakage BUILD_BUG_ON_ZERO and BUILD_BUG_ON_NULL must return values, even in the CHECKER case otherwise various users of it become syntactically invalid. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/kernel.h b/include/linux/kernel.h index fb0e7329fee1a..953352a88336c 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -671,8 +671,8 @@ struct sysinfo { #ifdef __CHECKER__ #define BUILD_BUG_ON_NOT_POWER_OF_2(n) -#define BUILD_BUG_ON_ZERO(e) -#define BUILD_BUG_ON_NULL(e) +#define BUILD_BUG_ON_ZERO(e) (0) +#define BUILD_BUG_ON_NULL(e) ((void*)0) #define BUILD_BUG_ON(condition) #else /* __CHECKER__ */