Commit ca39599c authored by Dr. David Alan Gilbert's avatar Dr. David Alan Gilbert Committed by Linus Torvalds

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: default avatarDr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3957c776
...@@ -671,8 +671,8 @@ struct sysinfo { ...@@ -671,8 +671,8 @@ struct sysinfo {
#ifdef __CHECKER__ #ifdef __CHECKER__
#define BUILD_BUG_ON_NOT_POWER_OF_2(n) #define BUILD_BUG_ON_NOT_POWER_OF_2(n)
#define BUILD_BUG_ON_ZERO(e) #define BUILD_BUG_ON_ZERO(e) (0)
#define BUILD_BUG_ON_NULL(e) #define BUILD_BUG_ON_NULL(e) ((void*)0)
#define BUILD_BUG_ON(condition) #define BUILD_BUG_ON(condition)
#else /* __CHECKER__ */ #else /* __CHECKER__ */
......
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