diff options
| author | Alex Elder <aelder@sgi.com> | 2010-02-26 14:34:02 -0600 |
|---|---|---|
| committer | Alex Elder <aelder@sgi.com> | 2010-02-26 14:34:02 -0600 |
| commit | 398007f863a4af2b4a5a07219c5a617f1a098115 (patch) | |
| tree | 7589f17bfa6645ee0342048bfaede1391a411f2b /include/linux/kernel.h | |
| parent | d67b1b03254c501fef371b0e5916c94a52bfc2c5 (diff) | |
| parent | 60b341b778cc2929df16c0a504c91621b3c6a4ad (diff) | |
Merge branch 'linux-2.6.33'
Diffstat (limited to 'include/linux/kernel.h')
| -rw-r--r-- | include/linux/kernel.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 3fc9f5aab5f8..328bca609b9b 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -734,6 +734,10 @@ struct sysinfo { /* Force a compilation error if condition is constant and true */ #define MAYBE_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)])) +/* Force a compilation error if a constant expression is not a power of 2 */ +#define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ + BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) + /* Force a compilation error if condition is true, but also produce a result (of value 0 and type size_t), so the expression can be used e.g. in a structure initializer (or where-ever else comma expressions |
