diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2005-10-07 02:46:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-08 18:00:57 -0400 |
commit | dd0fc66fb33cd610bc1a5db8a5e232d34879b4d7 (patch) | |
tree | 51f96a9db96293b352e358f66032e1f4ff79fafb /include/linux/gfp.h | |
parent | 3b0e77bd144203a507eb191f7117d2c5004ea1de (diff) |
[PATCH] gfp flags annotations - part 1
- added typedef unsigned int __nocast gfp_t;
- replaced __nocast uses for gfp flags with gfp_t - it gives exactly
the same warnings as far as sparse is concerned, doesn't change
generated code (from gcc point of view we replaced unsigned int with
typedef) and documents what's going on far better.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r-- | include/linux/gfp.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 4dc990f3b5cc..3010e172394d 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -85,9 +85,9 @@ static inline void arch_free_page(struct page *page, int order) { } | |||
85 | #endif | 85 | #endif |
86 | 86 | ||
87 | extern struct page * | 87 | extern struct page * |
88 | FASTCALL(__alloc_pages(unsigned int, unsigned int, struct zonelist *)); | 88 | FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *)); |
89 | 89 | ||
90 | static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_mask, | 90 | static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, |
91 | unsigned int order) | 91 | unsigned int order) |
92 | { | 92 | { |
93 | if (unlikely(order >= MAX_ORDER)) | 93 | if (unlikely(order >= MAX_ORDER)) |
@@ -98,17 +98,17 @@ static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_m | |||
98 | } | 98 | } |
99 | 99 | ||
100 | #ifdef CONFIG_NUMA | 100 | #ifdef CONFIG_NUMA |
101 | extern struct page *alloc_pages_current(unsigned int __nocast gfp_mask, unsigned order); | 101 | extern struct page *alloc_pages_current(gfp_t gfp_mask, unsigned order); |
102 | 102 | ||
103 | static inline struct page * | 103 | static inline struct page * |
104 | alloc_pages(unsigned int __nocast gfp_mask, unsigned int order) | 104 | alloc_pages(gfp_t gfp_mask, unsigned int order) |
105 | { | 105 | { |
106 | if (unlikely(order >= MAX_ORDER)) | 106 | if (unlikely(order >= MAX_ORDER)) |
107 | return NULL; | 107 | return NULL; |
108 | 108 | ||
109 | return alloc_pages_current(gfp_mask, order); | 109 | return alloc_pages_current(gfp_mask, order); |
110 | } | 110 | } |
111 | extern struct page *alloc_page_vma(unsigned __nocast gfp_mask, | 111 | extern struct page *alloc_page_vma(gfp_t gfp_mask, |
112 | struct vm_area_struct *vma, unsigned long addr); | 112 | struct vm_area_struct *vma, unsigned long addr); |
113 | #else | 113 | #else |
114 | #define alloc_pages(gfp_mask, order) \ | 114 | #define alloc_pages(gfp_mask, order) \ |
@@ -117,8 +117,8 @@ extern struct page *alloc_page_vma(unsigned __nocast gfp_mask, | |||
117 | #endif | 117 | #endif |
118 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) | 118 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) |
119 | 119 | ||
120 | extern unsigned long FASTCALL(__get_free_pages(unsigned int __nocast gfp_mask, unsigned int order)); | 120 | extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order)); |
121 | extern unsigned long FASTCALL(get_zeroed_page(unsigned int __nocast gfp_mask)); | 121 | extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask)); |
122 | 122 | ||
123 | #define __get_free_page(gfp_mask) \ | 123 | #define __get_free_page(gfp_mask) \ |
124 | __get_free_pages((gfp_mask),0) | 124 | __get_free_pages((gfp_mask),0) |