summaryrefslogtreecommitdiff
path: root/include/linux/types.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2005-10-21 10:55:38 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 19:16:46 +0400
commitaf4ca457eaf2d6682059c18463eb106e2ce58198 (patch)
tree399ca5ab3b15d723a6aefd04c764a2a06089ed06 /include/linux/types.h
parent434f1d10c1adb6c2e333d501ce1e42be610e0723 (diff)
downloadlinux-af4ca457eaf2d6682059c18463eb106e2ce58198.tar.xz
[PATCH] gfp_t: infrastructure
Beginning of gfp_t annotations: - -Wbitwise added to CHECKFLAGS - old __bitwise renamed to __bitwise__ - __bitwise defined to either __bitwise__ or nothing, depending on __CHECK_ENDIAN__ being defined - gfp_t switched from __nocast to __bitwise__ - force cast to gfp_t added to __GFP_... constants - new helper - gfp_zone(); extracts zone bits out of gfp_t value and casts the result to int Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/types.h')
-rw-r--r--include/linux/types.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/types.h b/include/linux/types.h
index 0aee34f9da9f..21b9ce803644 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -151,7 +151,12 @@ typedef unsigned long sector_t;
*/
#ifdef __CHECKER__
-#define __bitwise __attribute__((bitwise))
+#define __bitwise__ __attribute__((bitwise))
+#else
+#define __bitwise__
+#endif
+#ifdef __CHECK_ENDIAN__
+#define __bitwise __bitwise__
#else
#define __bitwise
#endif
@@ -166,7 +171,7 @@ typedef __u64 __bitwise __be64;
#endif
#ifdef __KERNEL__
-typedef unsigned __nocast gfp_t;
+typedef unsigned __bitwise__ gfp_t;
#endif
struct ustat {