History

[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.

Al Viro committed 21 years ago

Commit dd0fc661 parent 3b0e77b145 files · +340 −360Browse files

Showing the changes to include/linux (22 of 145 files). Show all

Unified · Split

22 files
  1. include/linux/atmdev.h +1 −1
  2. include/linux/bio.h +3 −3
  3. include/linux/buffer_head.h +1 −1
  4. include/linux/connector.h +1 −1
  5. include/linux/cpuset.h +2 −3
  6. include/linux/dmapool.h +1 −1
  7. include/linux/gfp.h +7 −7
  8. include/linux/jbd.h +1 −1
  9. include/linux/kfifo.h +2 −2
  10. include/linux/mempool.h +4 −5
  11. include/linux/netlink.h +1 −1
  12. include/linux/pagemap.h +1 −1
  13. include/linux/posix_acl.h +3 −3
  14. include/linux/radix-tree.h +1 −1
  15. include/linux/security.h +2 −4
  16. include/linux/skbuff.h +14 −14
  17. include/linux/slab.h +9 −10
  18. include/linux/string.h +1 −1
  19. include/linux/swap.h +1 −1
  20. include/linux/textsearch.h +1 −1
  21. include/linux/types.h +4 −0
  22. include/linux/vmalloc.h +2 −2
include/linux/atmdev.h+1−1
@@ -467,7 +467,7 @@ static inline void atm_dev_put(struct atm_dev *dev) · 466 unmodified lines
467467
468468 int atm_charge(struct atm_vcc *vcc,int truesize);
469469 struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
470− unsigned int __nocast gfp_flags);
470+ gfp_t gfp_flags);
471471 int atm_pcr_goal(struct atm_trafprm *tp);
472472
473473 void vcc_release_async(struct atm_vcc *vcc, int reply);
include/linux/bio.h+3−3
@@ -276,8 +276,8 @@ extern void bio_pair_release(struct bio_pair *dbio); · 275 unmodified lines
276276 extern struct bio_set *bioset_create(int, int, int);
277277 extern void bioset_free(struct bio_set *);
278278
279−extern struct bio *bio_alloc(unsigned int __nocast, int);
280−extern struct bio *bio_alloc_bioset(unsigned int __nocast, int, struct bio_set *);
279+extern struct bio *bio_alloc(gfp_t, int);
280+extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *);
281281 extern void bio_put(struct bio *);
282282 extern void bio_free(struct bio *, struct bio_set *);
283283
@@ -287,7 +287,7 @@ extern int bio_phys_segments(struct request_queue *, struct bio *); · 3 unmodified lines
287287 extern int bio_hw_segments(struct request_queue *, struct bio *);
288288
289289 extern void __bio_clone(struct bio *, struct bio *);
290−extern struct bio *bio_clone(struct bio *, unsigned int __nocast);
290+extern struct bio *bio_clone(struct bio *, gfp_t);
291291
292292 extern void bio_init(struct bio *);
293293
include/linux/buffer_head.h+1−1
@@ -172,7 +172,7 @@ void __brelse(struct buffer_head *); · 171 unmodified lines
172172 void __bforget(struct buffer_head *);
173173 void __breadahead(struct block_device *, sector_t block, int size);
174174 struct buffer_head *__bread(struct block_device *, sector_t block, int size);
175−struct buffer_head *alloc_buffer_head(unsigned int __nocast gfp_flags);
175+struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
176176 void free_buffer_head(struct buffer_head * bh);
177177 void FASTCALL(unlock_buffer(struct buffer_head *bh));
178178 void FASTCALL(__lock_buffer(struct buffer_head *bh));
include/linux/connector.h+1−1
@@ -149,7 +149,7 @@ struct cn_dev { · 148 unmodified lines
149149
150150 int cn_add_callback(struct cb_id *, char *, void (*callback) (void *));
151151 void cn_del_callback(struct cb_id *);
152−int cn_netlink_send(struct cn_msg *, u32, unsigned int __nocast);
152+int cn_netlink_send(struct cn_msg *, u32, gfp_t);
153153
154154 int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *));
155155 void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id);
include/linux/cpuset.h+2−3
@@ -23,7 +23,7 @@ void cpuset_init_current_mems_allowed(void); · 22 unmodified lines
2323 void cpuset_update_current_mems_allowed(void);
2424 void cpuset_restrict_to_mems_allowed(unsigned long *nodes);
2525 int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl);
26−extern int cpuset_zone_allowed(struct zone *z, unsigned int __nocast gfp_mask);
26+extern int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask);
2727 extern int cpuset_excl_nodes_overlap(const struct task_struct *p);
2828 extern struct file_operations proc_cpuset_operations;
2929 extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer);
@@ -49,8 +49,7 @@ static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) · 19 unmodified lines
4949 return 1;
5050 }
5151
52−static inline int cpuset_zone_allowed(struct zone *z,
53− unsigned int __nocast gfp_mask)
52+static inline int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
5453 {
5554 return 1;
5655 }
include/linux/dmapool.h+1−1
@@ -19,7 +19,7 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev, · 18 unmodified lines
1919
2020 void dma_pool_destroy(struct dma_pool *pool);
2121
22−void *dma_pool_alloc(struct dma_pool *pool, unsigned int __nocast mem_flags,
22+void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
2323 dma_addr_t *handle);
2424
2525 void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr);
include/linux/gfp.h+7−7
@@ -85,9 +85,9 @@ static inline void arch_free_page(struct page *page, int order) { } · 84 unmodified lines
8585 #endif
8686
8787 extern struct page *
88−FASTCALL(__alloc_pages(unsigned int, unsigned int, struct zonelist *));
88+FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *));
8989
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,
9191 unsigned int order)
9292 {
9393 if (unlikely(order >= MAX_ORDER))
@@ -98,17 +98,17 @@ static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_m · 4 unmodified lines
9898 }
9999
100100 #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);
102102
103103 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)
105105 {
106106 if (unlikely(order >= MAX_ORDER))
107107 return NULL;
108108
109109 return alloc_pages_current(gfp_mask, order);
110110 }
111−extern struct page *alloc_page_vma(unsigned __nocast gfp_mask,
111+extern struct page *alloc_page_vma(gfp_t gfp_mask,
112112 struct vm_area_struct *vma, unsigned long addr);
113113 #else
114114 #define alloc_pages(gfp_mask, order) \
@@ -117,8 +117,8 @@ extern struct page *alloc_page_vma(unsigned __nocast gfp_mask, · 2 unmodified lines
117117 #endif
118118 #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
119119
120−extern unsigned long FASTCALL(__get_free_pages(unsigned int __nocast gfp_mask, unsigned int order));
121−extern unsigned long FASTCALL(get_zeroed_page(unsigned int __nocast gfp_mask));
120+extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order));
121+extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask));
122122
123123 #define __get_free_page(gfp_mask) \
124124 __get_free_pages((gfp_mask),0)
include/linux/jbd.h+1−1
@@ -935,7 +935,7 @@ void journal_put_journal_head(struct journal_head *jh); · 934 unmodified lines
935935 */
936936 extern kmem_cache_t *jbd_handle_cache;
937937
938−static inline handle_t *jbd_alloc_handle(unsigned int __nocast gfp_flags)
938+static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags)
939939 {
940940 return kmem_cache_alloc(jbd_handle_cache, gfp_flags);
941941 }
include/linux/kfifo.h+2−2
@@ -35,8 +35,8 @@ struct kfifo { · 34 unmodified lines
3535 };
3636
3737 extern struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size,
38− unsigned int __nocast gfp_mask, spinlock_t *lock);
39−extern struct kfifo *kfifo_alloc(unsigned int size, unsigned int __nocast gfp_mask,
38+ gfp_t gfp_mask, spinlock_t *lock);
39+extern struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask,
4040 spinlock_t *lock);
4141 extern void kfifo_free(struct kfifo *fifo);
4242 extern unsigned int __kfifo_put(struct kfifo *fifo,
include/linux/mempool.h+4−5
@@ -6,7 +6,7 @@ · 5 unmodified lines
66
77 #include <linux/wait.h>
88
9−typedef void * (mempool_alloc_t)(unsigned int __nocast gfp_mask, void *pool_data);
9+typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data);
1010 typedef void (mempool_free_t)(void *element, void *pool_data);
1111
1212 typedef struct mempool_s {
@@ -26,17 +26,16 @@ extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn, · 13 unmodified lines
2626 extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
2727 mempool_free_t *free_fn, void *pool_data, int nid);
2828
29−extern int mempool_resize(mempool_t *pool, int new_min_nr,
30− unsigned int __nocast gfp_mask);
29+extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask);
3130 extern void mempool_destroy(mempool_t *pool);
32−extern void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask);
31+extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask);
3332 extern void mempool_free(void *element, mempool_t *pool);
3433
3534 /*
3635 * A mempool_alloc_t and mempool_free_t that get the memory from
3736 * a slab that is passed in through pool_data.
3837 */
39−void *mempool_alloc_slab(unsigned int __nocast gfp_mask, void *pool_data);
38+void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data);
4039 void mempool_free_slab(void *element, void *pool_data);
4140
4241 #endif /* _LINUX_MEMPOOL_H */
include/linux/netlink.h+1−1
@@ -131,7 +131,7 @@ extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (* · 130 unmodified lines
131131 extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
132132 extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
133133 extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
134− __u32 group, unsigned int __nocast allocation);
134+ __u32 group, gfp_t allocation);
135135 extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);
136136 extern int netlink_register_notifier(struct notifier_block *nb);
137137 extern int netlink_unregister_notifier(struct notifier_block *nb);
include/linux/pagemap.h+1−1
@@ -19,7 +19,7 @@ · 18 unmodified lines
1919 #define AS_EIO (__GFP_BITS_SHIFT + 0) /* IO error on async write */
2020 #define AS_ENOSPC (__GFP_BITS_SHIFT + 1) /* ENOSPC on async write */
2121
22−static inline unsigned int __nocast mapping_gfp_mask(struct address_space * mapping)
22+static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
2323 {
2424 return mapping->flags & __GFP_BITS_MASK;
2525 }
include/linux/posix_acl.h+3−3
@@ -71,11 +71,11 @@ posix_acl_release(struct posix_acl *acl) · 70 unmodified lines
7171
7272 /* posix_acl.c */
7373
74−extern struct posix_acl *posix_acl_alloc(int, unsigned int __nocast);
75−extern struct posix_acl *posix_acl_clone(const struct posix_acl *, unsigned int __nocast);
74+extern struct posix_acl *posix_acl_alloc(int, gfp_t);
75+extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t);
7676 extern int posix_acl_valid(const struct posix_acl *);
7777 extern int posix_acl_permission(struct inode *, const struct posix_acl *, int);
78−extern struct posix_acl *posix_acl_from_mode(mode_t, unsigned int __nocast);
78+extern struct posix_acl *posix_acl_from_mode(mode_t, gfp_t);
7979 extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *);
8080 extern int posix_acl_create_masq(struct posix_acl *, mode_t *);
8181 extern int posix_acl_chmod_masq(struct posix_acl *, mode_t);
include/linux/radix-tree.h+1−1
@@ -50,7 +50,7 @@ void *radix_tree_delete(struct radix_tree_root *, unsigned long); · 49 unmodified lines
5050 unsigned int
5151 radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
5252 unsigned long first_index, unsigned int max_items);
53−int radix_tree_preload(unsigned int __nocast gfp_mask);
53+int radix_tree_preload(gfp_t gfp_mask);
5454 void radix_tree_init(void);
5555 void *radix_tree_tag_set(struct radix_tree_root *root,
5656 unsigned long index, int tag);
include/linux/security.h+2−4
@@ -2634,8 +2634,7 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o · 2633 unmodified lines
26342634 return security_ops->socket_getpeersec(sock, optval, optlen, len);
26352635 }
26362636
2637−static inline int security_sk_alloc(struct sock *sk, int family,
2638− unsigned int __nocast priority)
2637+static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority)
26392638 {
26402639 return security_ops->sk_alloc_security(sk, family, priority);
26412640 }
@@ -2752,8 +2751,7 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o · 110 unmodified lines
27522751 return -ENOPROTOOPT;
27532752 }
27542753
2755−static inline int security_sk_alloc(struct sock *sk, int family,
2756− unsigned int __nocast priority)
2754+static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority)
27572755 {
27582756 return 0;
27592757 }
include/linux/skbuff.h+14−14
@@ -302,37 +302,37 @@ struct sk_buff { · 301 unmodified lines
302302
303303 extern void __kfree_skb(struct sk_buff *skb);
304304 extern struct sk_buff *__alloc_skb(unsigned int size,
305− unsigned int __nocast priority, int fclone);
305+ gfp_t priority, int fclone);
306306 static inline struct sk_buff *alloc_skb(unsigned int size,
307− unsigned int __nocast priority)
307+ gfp_t priority)
308308 {
309309 return __alloc_skb(size, priority, 0);
310310 }
311311
312312 static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
313− unsigned int __nocast priority)
313+ gfp_t priority)
314314 {
315315 return __alloc_skb(size, priority, 1);
316316 }
317317
318318 extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
319319 unsigned int size,
320− unsigned int __nocast priority);
320+ gfp_t priority);
321321 extern void kfree_skbmem(struct sk_buff *skb);
322322 extern struct sk_buff *skb_clone(struct sk_buff *skb,
323− unsigned int __nocast priority);
323+ gfp_t priority);
324324 extern struct sk_buff *skb_copy(const struct sk_buff *skb,
325− unsigned int __nocast priority);
325+ gfp_t priority);
326326 extern struct sk_buff *pskb_copy(struct sk_buff *skb,
327− unsigned int __nocast gfp_mask);
327+ gfp_t gfp_mask);
328328 extern int pskb_expand_head(struct sk_buff *skb,
329329 int nhead, int ntail,
330− unsigned int __nocast gfp_mask);
330+ gfp_t gfp_mask);
331331 extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb,
332332 unsigned int headroom);
333333 extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
334334 int newheadroom, int newtailroom,
335− unsigned int __nocast priority);
335+ gfp_t priority);
336336 extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad);
337337 #define dev_kfree_skb(a) kfree_skb(a)
338338 extern void skb_over_panic(struct sk_buff *skb, int len,
@@ -484,7 +484,7 @@ static inline int skb_shared(const struct sk_buff *skb) · 145 unmodified lines
484484 * NULL is returned on a memory allocation failure.
485485 */
486486 static inline struct sk_buff *skb_share_check(struct sk_buff *skb,
487− unsigned int __nocast pri)
487+ gfp_t pri)
488488 {
489489 might_sleep_if(pri & __GFP_WAIT);
490490 if (skb_shared(skb)) {
@@ -516,7 +516,7 @@ static inline struct sk_buff *skb_share_check(struct sk_buff *skb, · 25 unmodified lines
516516 * %NULL is returned on a memory allocation failure.
517517 */
518518 static inline struct sk_buff *skb_unshare(struct sk_buff *skb,
519− unsigned int __nocast pri)
519+ gfp_t pri)
520520 {
521521 might_sleep_if(pri & __GFP_WAIT);
522522 if (skb_cloned(skb)) {
@@ -1017,7 +1017,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) · 494 unmodified lines
10171017 * %NULL is returned in there is no free memory.
10181018 */
10191019 static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
1020− unsigned int __nocast gfp_mask)
1020+ gfp_t gfp_mask)
10211021 {
10221022 struct sk_buff *skb = alloc_skb(length + 16, gfp_mask);
10231023 if (likely(skb))
@@ -1130,8 +1130,8 @@ static inline int skb_can_coalesce(struct sk_buff *skb, int i, · 106 unmodified lines
11301130 * If there is no free memory -ENOMEM is returned, otherwise zero
11311131 * is returned and the old skb data released.
11321132 */
1133−extern int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp);
1134−static inline int skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp)
1133+extern int __skb_linearize(struct sk_buff *skb, gfp_t gfp);
1134+static inline int skb_linearize(struct sk_buff *skb, gfp_t gfp)
11351135 {
11361136 return __skb_linearize(skb, gfp);
11371137 }
include/linux/slab.h+9−10
@@ -61,11 +61,11 @@ extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned lo · 60 unmodified lines
6161 void (*)(void *, kmem_cache_t *, unsigned long));
6262 extern int kmem_cache_destroy(kmem_cache_t *);
6363 extern int kmem_cache_shrink(kmem_cache_t *);
64−extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast);
64+extern void *kmem_cache_alloc(kmem_cache_t *, gfp_t);
6565 extern void kmem_cache_free(kmem_cache_t *, void *);
6666 extern unsigned int kmem_cache_size(kmem_cache_t *);
6767 extern const char *kmem_cache_name(kmem_cache_t *);
68−extern kmem_cache_t *kmem_find_general_cachep(size_t size, unsigned int __nocast gfpflags);
68+extern kmem_cache_t *kmem_find_general_cachep(size_t size, gfp_t gfpflags);
6969
7070 /* Size description struct for general caches. */
7171 struct cache_sizes {
@@ -74,9 +74,9 @@ struct cache_sizes { · 2 unmodified lines
7474 kmem_cache_t *cs_dmacachep;
7575 };
7676 extern struct cache_sizes malloc_sizes[];
77−extern void *__kmalloc(size_t, unsigned int __nocast);
77+extern void *__kmalloc(size_t, gfp_t);
7878
79−static inline void *kmalloc(size_t size, unsigned int __nocast flags)
79+static inline void *kmalloc(size_t size, gfp_t flags)
8080 {
8181 if (__builtin_constant_p(size)) {
8282 int i = 0;
@@ -99,7 +99,7 @@ found: · 16 unmodified lines
9999 return __kmalloc(size, flags);
100100 }
101101
102−extern void *kzalloc(size_t, unsigned int __nocast);
102+extern void *kzalloc(size_t, gfp_t);
103103
104104 /**
105105 * kcalloc - allocate memory for an array. The memory is set to zero.
@@ -107,7 +107,7 @@ extern void *kzalloc(size_t, unsigned int __nocast); · 1 unmodified line
107107 * @size: element size.
108108 * @flags: the type of memory to allocate.
109109 */
110−static inline void *kcalloc(size_t n, size_t size, unsigned int __nocast flags)
110+static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
111111 {
112112 if (n != 0 && size > INT_MAX / n)
113113 return NULL;
@@ -118,15 +118,14 @@ extern void kfree(const void *); · 4 unmodified lines
118118 extern unsigned int ksize(const void *);
119119
120120 #ifdef CONFIG_NUMA
121−extern void *kmem_cache_alloc_node(kmem_cache_t *,
122− unsigned int __nocast flags, int node);
123−extern void *kmalloc_node(size_t size, unsigned int __nocast flags, int node);
121+extern void *kmem_cache_alloc_node(kmem_cache_t *, gfp_t flags, int node);
122+extern void *kmalloc_node(size_t size, gfp_t flags, int node);
124123 #else
125124 static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node)
126125 {
127126 return kmem_cache_alloc(cachep, flags);
128127 }
129−static inline void *kmalloc_node(size_t size, unsigned int __nocast flags, int node)
128+static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
130129 {
131130 return kmalloc(size, flags);
132131 }
include/linux/string.h+1−1
@@ -88,7 +88,7 @@ extern int memcmp(const void *,const void *,__kernel_size_t); · 87 unmodified lines
8888 extern void * memchr(const void *,int,__kernel_size_t);
8989 #endif
9090
91−extern char *kstrdup(const char *s, unsigned int __nocast gfp);
91+extern char *kstrdup(const char *s, gfp_t gfp);
9292
9393 #ifdef __cplusplus
9494 }
include/linux/swap.h+1−1
@@ -147,7 +147,7 @@ struct swap_list_t { · 146 unmodified lines
147147 #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
148148
149149 /* linux/mm/oom_kill.c */
150−extern void out_of_memory(unsigned int __nocast gfp_mask, int order);
150+extern void out_of_memory(gfp_t gfp_mask, int order);
151151
152152 /* linux/mm/memory.c */
153153 extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *);
include/linux/textsearch.h+1−1
@@ -159,7 +159,7 @@ extern unsigned int textsearch_find_continuous(struct ts_config *, · 158 unmodified lines
159159 #define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1))
160160
161161 static inline struct ts_config *alloc_ts_config(size_t payload,
162− unsigned int __nocast gfp_mask)
162+ gfp_t gfp_mask)
163163 {
164164 struct ts_config *conf;
165165
include/linux/types.h+4−0
@@ -165,6 +165,10 @@ typedef __u64 __bitwise __le64; · 164 unmodified lines
165165 typedef __u64 __bitwise __be64;
166166 #endif
167167
168+#ifdef __KERNEL__
169+typedef unsigned __nocast gfp_t;
170+#endif
171+
168172 struct ustat {
169173 __kernel_daddr_t f_tfree;
170174 __kernel_ino_t f_tinode;
include/linux/vmalloc.h+2−2
@@ -34,8 +34,8 @@ struct vm_struct { · 33 unmodified lines
3434 extern void *vmalloc(unsigned long size);
3535 extern void *vmalloc_exec(unsigned long size);
3636 extern void *vmalloc_32(unsigned long size);
37−extern void *__vmalloc(unsigned long size, unsigned int __nocast gfp_mask, pgprot_t prot);
38−extern void *__vmalloc_area(struct vm_struct *area, unsigned int __nocast gfp_mask, pgprot_t prot);
37+extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot);
38+extern void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, pgprot_t prot);
3939 extern void vfree(void *addr);
4040
4141 extern void *vmap(struct page **pages, unsigned int count,