git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restore __ALIGN_MASK()
[safe/jmp/linux-2.6]
/
include
/
linux
/
kernel.h
diff --git
a/include/linux/kernel.h
b/include/linux/kernel.h
index
7f07074
..
db6717d
100644
(file)
--- a/
include/linux/kernel.h
+++ b/
include/linux/kernel.h
@@
-4,6
+4,8
@@
/*
* 'kernel.h' contains some often-used function prototypes etc
*/
/*
* 'kernel.h' contains some often-used function prototypes etc
*/
+#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
+#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
#ifdef __KERNEL__
#ifdef __KERNEL__
@@
-37,8
+39,8
@@
extern const char linux_proc_banner[];
#define STACK_MAGIC 0xdeadbeef
#define STACK_MAGIC 0xdeadbeef
-#define ALIGN(x,
a) __ALIGN_MASK(x,(typeof(x))(a)-1
)
-#define __ALIGN_MASK(x,
mask) (((x)+(mask))&~
(mask))
+#define ALIGN(x,
a) __ALIGN_KERNEL((x), (a)
)
+#define __ALIGN_MASK(x,
mask) __ALIGN_KERNEL_MASK((x),
(mask))
#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)