diff options
author | Daniel Santos <daniel.santos@pobox.com> | 2013-02-21 19:41:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:22:15 -0500 |
commit | ca623c914e82c3351cd657073fdb24a1df8c27b9 (patch) | |
tree | 10cfcc12a6c3e5927ed67a73070870c83f2d704c /include/linux/bug.h | |
parent | 6ae8d04871f84d853673e9e9f3f713e77a2fe145 (diff) |
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 <daniel.santos@pobox.com>
Acked-by: Borislav Petkov <bp@alien8.de>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Joe Perches <joe@perches.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/bug.h')
-rw-r--r-- | include/linux/bug.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 { | |||
12 | struct pt_regs; | 12 | struct pt_regs; |
13 | 13 | ||
14 | #ifdef __CHECKER__ | 14 | #ifdef __CHECKER__ |
15 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) | 15 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) (0) |
16 | #define BUILD_BUG_ON_ZERO(e) (0) | 16 | #define BUILD_BUG_ON_ZERO(e) (0) |
17 | #define BUILD_BUG_ON_NULL(e) ((void*)0) | 17 | #define BUILD_BUG_ON_NULL(e) ((void*)0) |
18 | #define BUILD_BUG_ON_INVALID(e) (0) | 18 | #define BUILD_BUG_ON_INVALID(e) (0) |
19 | #define BUILD_BUG_ON(condition) | 19 | #define BUILD_BUG_ON(condition) (0) |
20 | #define BUILD_BUG() (0) | 20 | #define BUILD_BUG() (0) |
21 | #else /* __CHECKER__ */ | 21 | #else /* __CHECKER__ */ |
22 | 22 | ||