aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/kernel.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index f37ba716ef8b..22295244de18 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -638,6 +638,13 @@ struct sysinfo {
638 char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ 638 char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
639}; 639};
640 640
641#ifdef __CHECKER__
642#define BUILD_BUG_ON_NOT_POWER_OF_2(n)
643#define BUILD_BUG_ON_ZERO(e)
644#define BUILD_BUG_ON_NULL(e)
645#define BUILD_BUG_ON(condition)
646#else /* __CHECKER__ */
647
641/* Force a compilation error if a constant expression is not a power of 2 */ 648/* Force a compilation error if a constant expression is not a power of 2 */
642#define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ 649#define BUILD_BUG_ON_NOT_POWER_OF_2(n) \
643 BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) 650 BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0))
@@ -674,6 +681,7 @@ extern int __build_bug_on_failed;
674 if (condition) __build_bug_on_failed = 1; \ 681 if (condition) __build_bug_on_failed = 1; \
675 } while(0) 682 } while(0)
676#endif 683#endif
684#endif /* __CHECKER__ */
677 685
678/* Trap pasters of __FUNCTION__ at compile-time */ 686/* Trap pasters of __FUNCTION__ at compile-time */
679#define __FUNCTION__ (__func__) 687#define __FUNCTION__ (__func__)