diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-11 02:03:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-11 02:03:26 -0400 |
commit | d250fe91ae129bff0968e685cc9c466d3a5e3482 (patch) | |
tree | e38b7628a5c6afb80c22341759f392585e558cb1 /include/linux/kernel.h | |
parent | 1ae5dc342ac78d7a42965fd1f323815f6f5ef2c1 (diff) | |
parent | b56f2d55c6c22b0c5774b3b22e336fb6cc5f4094 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 9365227dbaf6..a38d6bd6fde6 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -4,6 +4,8 @@ | |||
4 | /* | 4 | /* |
5 | * 'kernel.h' contains some often-used function prototypes etc | 5 | * 'kernel.h' contains some often-used function prototypes etc |
6 | */ | 6 | */ |
7 | #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) | ||
8 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) | ||
7 | 9 | ||
8 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
9 | 11 | ||
@@ -37,8 +39,8 @@ extern const char linux_proc_banner[]; | |||
37 | 39 | ||
38 | #define STACK_MAGIC 0xdeadbeef | 40 | #define STACK_MAGIC 0xdeadbeef |
39 | 41 | ||
40 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | 42 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) |
41 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | 43 | #define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask)) |
42 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) | 44 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) |
43 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) | 45 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) |
44 | 46 | ||