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 /net | |
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 'net')
38 files changed, 95 insertions, 102 deletions
diff --git a/net/atm/atm_misc.c b/net/atm/atm_misc.c index 71abc99ec815..223c7ad5bd0f 100644 --- a/net/atm/atm_misc.c +++ b/net/atm/atm_misc.c | |||
@@ -25,7 +25,7 @@ int atm_charge(struct atm_vcc *vcc,int truesize) | |||
25 | 25 | ||
26 | 26 | ||
27 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, | 27 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, |
28 | unsigned int __nocast gfp_flags) | 28 | gfp_t gfp_flags) |
29 | { | 29 | { |
30 | struct sock *sk = sk_atm(vcc); | 30 | struct sock *sk = sk_atm(vcc); |
31 | int guess = atm_guess_pdu2truesize(pdu_size); | 31 | int guess = atm_guess_pdu2truesize(pdu_size); |
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index d3d6bc547212..59b2dd36baa7 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -372,7 +372,7 @@ static struct proto l2cap_proto = { | |||
372 | .obj_size = sizeof(struct l2cap_pinfo) | 372 | .obj_size = sizeof(struct l2cap_pinfo) |
373 | }; | 373 | }; |
374 | 374 | ||
375 | static struct sock *l2cap_sock_alloc(struct socket *sock, int proto, unsigned int __nocast prio) | 375 | static struct sock *l2cap_sock_alloc(struct socket *sock, int proto, gfp_t prio) |
376 | { | 376 | { |
377 | struct sock *sk; | 377 | struct sock *sk; |
378 | 378 | ||
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 173f46e8cdae..35adce6482b6 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -229,7 +229,7 @@ static void rfcomm_dlc_clear_state(struct rfcomm_dlc *d) | |||
229 | d->rx_credits = RFCOMM_DEFAULT_CREDITS; | 229 | d->rx_credits = RFCOMM_DEFAULT_CREDITS; |
230 | } | 230 | } |
231 | 231 | ||
232 | struct rfcomm_dlc *rfcomm_dlc_alloc(unsigned int __nocast prio) | 232 | struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio) |
233 | { | 233 | { |
234 | struct rfcomm_dlc *d = kmalloc(sizeof(*d), prio); | 234 | struct rfcomm_dlc *d = kmalloc(sizeof(*d), prio); |
235 | if (!d) | 235 | if (!d) |
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c index f49e7e938bfb..a2b30f0aedb7 100644 --- a/net/bluetooth/rfcomm/sock.c +++ b/net/bluetooth/rfcomm/sock.c | |||
@@ -284,7 +284,7 @@ static struct proto rfcomm_proto = { | |||
284 | .obj_size = sizeof(struct rfcomm_pinfo) | 284 | .obj_size = sizeof(struct rfcomm_pinfo) |
285 | }; | 285 | }; |
286 | 286 | ||
287 | static struct sock *rfcomm_sock_alloc(struct socket *sock, int proto, unsigned int __nocast prio) | 287 | static struct sock *rfcomm_sock_alloc(struct socket *sock, int proto, gfp_t prio) |
288 | { | 288 | { |
289 | struct rfcomm_dlc *d; | 289 | struct rfcomm_dlc *d; |
290 | struct sock *sk; | 290 | struct sock *sk; |
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 1bca860a6109..158a9c46d863 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c | |||
@@ -286,7 +286,7 @@ static inline void rfcomm_set_owner_w(struct sk_buff *skb, struct rfcomm_dev *de | |||
286 | skb->destructor = rfcomm_wfree; | 286 | skb->destructor = rfcomm_wfree; |
287 | } | 287 | } |
288 | 288 | ||
289 | static struct sk_buff *rfcomm_wmalloc(struct rfcomm_dev *dev, unsigned long size, unsigned int __nocast priority) | 289 | static struct sk_buff *rfcomm_wmalloc(struct rfcomm_dev *dev, unsigned long size, gfp_t priority) |
290 | { | 290 | { |
291 | if (atomic_read(&dev->wmem_alloc) < rfcomm_room(dev->dlc)) { | 291 | if (atomic_read(&dev->wmem_alloc) < rfcomm_room(dev->dlc)) { |
292 | struct sk_buff *skb = alloc_skb(size, priority); | 292 | struct sk_buff *skb = alloc_skb(size, priority); |
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index ce7ab7dfa0b2..997e42df115c 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -418,7 +418,7 @@ static struct proto sco_proto = { | |||
418 | .obj_size = sizeof(struct sco_pinfo) | 418 | .obj_size = sizeof(struct sco_pinfo) |
419 | }; | 419 | }; |
420 | 420 | ||
421 | static struct sock *sco_sock_alloc(struct socket *sock, int proto, unsigned int __nocast prio) | 421 | static struct sock *sco_sock_alloc(struct socket *sock, int proto, gfp_t prio) |
422 | { | 422 | { |
423 | struct sock *sk; | 423 | struct sock *sk; |
424 | 424 | ||
diff --git a/net/core/dev.c b/net/core/dev.c index 9066c874e273..a44eeef24edf 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1132,7 +1132,7 @@ static inline int illegal_highdma(struct net_device *dev, struct sk_buff *skb) | |||
1132 | #endif | 1132 | #endif |
1133 | 1133 | ||
1134 | /* Keep head the same: replace data */ | 1134 | /* Keep head the same: replace data */ |
1135 | int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp_mask) | 1135 | int __skb_linearize(struct sk_buff *skb, gfp_t gfp_mask) |
1136 | { | 1136 | { |
1137 | unsigned int size; | 1137 | unsigned int size; |
1138 | u8 *data; | 1138 | u8 *data; |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 0e9431b59fb2..af9b1516e21f 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -130,7 +130,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here) | |||
130 | * Buffers may only be allocated from interrupts using a @gfp_mask of | 130 | * Buffers may only be allocated from interrupts using a @gfp_mask of |
131 | * %GFP_ATOMIC. | 131 | * %GFP_ATOMIC. |
132 | */ | 132 | */ |
133 | struct sk_buff *__alloc_skb(unsigned int size, unsigned int __nocast gfp_mask, | 133 | struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, |
134 | int fclone) | 134 | int fclone) |
135 | { | 135 | { |
136 | struct sk_buff *skb; | 136 | struct sk_buff *skb; |
@@ -198,7 +198,7 @@ nodata: | |||
198 | */ | 198 | */ |
199 | struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp, | 199 | struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp, |
200 | unsigned int size, | 200 | unsigned int size, |
201 | unsigned int __nocast gfp_mask) | 201 | gfp_t gfp_mask) |
202 | { | 202 | { |
203 | struct sk_buff *skb; | 203 | struct sk_buff *skb; |
204 | u8 *data; | 204 | u8 *data; |
@@ -361,7 +361,7 @@ void __kfree_skb(struct sk_buff *skb) | |||
361 | * %GFP_ATOMIC. | 361 | * %GFP_ATOMIC. |
362 | */ | 362 | */ |
363 | 363 | ||
364 | struct sk_buff *skb_clone(struct sk_buff *skb, unsigned int __nocast gfp_mask) | 364 | struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask) |
365 | { | 365 | { |
366 | struct sk_buff *n; | 366 | struct sk_buff *n; |
367 | 367 | ||
@@ -500,7 +500,7 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) | |||
500 | * header is going to be modified. Use pskb_copy() instead. | 500 | * header is going to be modified. Use pskb_copy() instead. |
501 | */ | 501 | */ |
502 | 502 | ||
503 | struct sk_buff *skb_copy(const struct sk_buff *skb, unsigned int __nocast gfp_mask) | 503 | struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask) |
504 | { | 504 | { |
505 | int headerlen = skb->data - skb->head; | 505 | int headerlen = skb->data - skb->head; |
506 | /* | 506 | /* |
@@ -539,7 +539,7 @@ struct sk_buff *skb_copy(const struct sk_buff *skb, unsigned int __nocast gfp_ma | |||
539 | * The returned buffer has a reference count of 1. | 539 | * The returned buffer has a reference count of 1. |
540 | */ | 540 | */ |
541 | 541 | ||
542 | struct sk_buff *pskb_copy(struct sk_buff *skb, unsigned int __nocast gfp_mask) | 542 | struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask) |
543 | { | 543 | { |
544 | /* | 544 | /* |
545 | * Allocate the copy buffer | 545 | * Allocate the copy buffer |
@@ -598,7 +598,7 @@ out: | |||
598 | */ | 598 | */ |
599 | 599 | ||
600 | int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, | 600 | int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, |
601 | unsigned int __nocast gfp_mask) | 601 | gfp_t gfp_mask) |
602 | { | 602 | { |
603 | int i; | 603 | int i; |
604 | u8 *data; | 604 | u8 *data; |
@@ -689,7 +689,7 @@ struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, unsigned int headroom) | |||
689 | */ | 689 | */ |
690 | struct sk_buff *skb_copy_expand(const struct sk_buff *skb, | 690 | struct sk_buff *skb_copy_expand(const struct sk_buff *skb, |
691 | int newheadroom, int newtailroom, | 691 | int newheadroom, int newtailroom, |
692 | unsigned int __nocast gfp_mask) | 692 | gfp_t gfp_mask) |
693 | { | 693 | { |
694 | /* | 694 | /* |
695 | * Allocate the copy buffer | 695 | * Allocate the copy buffer |
diff --git a/net/core/sock.c b/net/core/sock.c index 928d2a1d6d8e..1c52fe809eda 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -637,7 +637,7 @@ lenout: | |||
637 | * @prot: struct proto associated with this new sock instance | 637 | * @prot: struct proto associated with this new sock instance |
638 | * @zero_it: if we should zero the newly allocated sock | 638 | * @zero_it: if we should zero the newly allocated sock |
639 | */ | 639 | */ |
640 | struct sock *sk_alloc(int family, unsigned int __nocast priority, | 640 | struct sock *sk_alloc(int family, gfp_t priority, |
641 | struct proto *prot, int zero_it) | 641 | struct proto *prot, int zero_it) |
642 | { | 642 | { |
643 | struct sock *sk = NULL; | 643 | struct sock *sk = NULL; |
@@ -704,7 +704,7 @@ void sk_free(struct sock *sk) | |||
704 | module_put(owner); | 704 | module_put(owner); |
705 | } | 705 | } |
706 | 706 | ||
707 | struct sock *sk_clone(const struct sock *sk, const unsigned int __nocast priority) | 707 | struct sock *sk_clone(const struct sock *sk, const gfp_t priority) |
708 | { | 708 | { |
709 | struct sock *newsk = sk_alloc(sk->sk_family, priority, sk->sk_prot, 0); | 709 | struct sock *newsk = sk_alloc(sk->sk_family, priority, sk->sk_prot, 0); |
710 | 710 | ||
@@ -845,7 +845,7 @@ unsigned long sock_i_ino(struct sock *sk) | |||
845 | * Allocate a skb from the socket's send buffer. | 845 | * Allocate a skb from the socket's send buffer. |
846 | */ | 846 | */ |
847 | struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, | 847 | struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, |
848 | unsigned int __nocast priority) | 848 | gfp_t priority) |
849 | { | 849 | { |
850 | if (force || atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) { | 850 | if (force || atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) { |
851 | struct sk_buff * skb = alloc_skb(size, priority); | 851 | struct sk_buff * skb = alloc_skb(size, priority); |
@@ -861,7 +861,7 @@ struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, | |||
861 | * Allocate a skb from the socket's receive buffer. | 861 | * Allocate a skb from the socket's receive buffer. |
862 | */ | 862 | */ |
863 | struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force, | 863 | struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force, |
864 | unsigned int __nocast priority) | 864 | gfp_t priority) |
865 | { | 865 | { |
866 | if (force || atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf) { | 866 | if (force || atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf) { |
867 | struct sk_buff *skb = alloc_skb(size, priority); | 867 | struct sk_buff *skb = alloc_skb(size, priority); |
@@ -876,7 +876,7 @@ struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force, | |||
876 | /* | 876 | /* |
877 | * Allocate a memory block from the socket's option memory buffer. | 877 | * Allocate a memory block from the socket's option memory buffer. |
878 | */ | 878 | */ |
879 | void *sock_kmalloc(struct sock *sk, int size, unsigned int __nocast priority) | 879 | void *sock_kmalloc(struct sock *sk, int size, gfp_t priority) |
880 | { | 880 | { |
881 | if ((unsigned)size <= sysctl_optmem_max && | 881 | if ((unsigned)size <= sysctl_optmem_max && |
882 | atomic_read(&sk->sk_omem_alloc) + size < sysctl_optmem_max) { | 882 | atomic_read(&sk->sk_omem_alloc) + size < sysctl_optmem_max) { |
diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c index 6530283eafca..c9a62cca22fc 100644 --- a/net/dccp/ackvec.c +++ b/net/dccp/ackvec.c | |||
@@ -91,7 +91,7 @@ int dccp_insert_option_ackvec(struct sock *sk, struct sk_buff *skb) | |||
91 | } | 91 | } |
92 | 92 | ||
93 | struct dccp_ackvec *dccp_ackvec_alloc(const unsigned int len, | 93 | struct dccp_ackvec *dccp_ackvec_alloc(const unsigned int len, |
94 | const unsigned int __nocast priority) | 94 | const gfp_t priority) |
95 | { | 95 | { |
96 | struct dccp_ackvec *av = kmalloc(sizeof(*av) + len, priority); | 96 | struct dccp_ackvec *av = kmalloc(sizeof(*av) + len, priority); |
97 | 97 | ||
diff --git a/net/dccp/ackvec.h b/net/dccp/ackvec.h index 8ca51c9191f7..d0fd6c60c574 100644 --- a/net/dccp/ackvec.h +++ b/net/dccp/ackvec.h | |||
@@ -74,7 +74,7 @@ struct sk_buff; | |||
74 | 74 | ||
75 | #ifdef CONFIG_IP_DCCP_ACKVEC | 75 | #ifdef CONFIG_IP_DCCP_ACKVEC |
76 | extern struct dccp_ackvec *dccp_ackvec_alloc(unsigned int len, | 76 | extern struct dccp_ackvec *dccp_ackvec_alloc(unsigned int len, |
77 | const unsigned int __nocast priority); | 77 | const gfp_t priority); |
78 | extern void dccp_ackvec_free(struct dccp_ackvec *av); | 78 | extern void dccp_ackvec_free(struct dccp_ackvec *av); |
79 | 79 | ||
80 | extern int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk, | 80 | extern int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk, |
@@ -93,7 +93,7 @@ static inline int dccp_ackvec_pending(const struct dccp_ackvec *av) | |||
93 | } | 93 | } |
94 | #else /* CONFIG_IP_DCCP_ACKVEC */ | 94 | #else /* CONFIG_IP_DCCP_ACKVEC */ |
95 | static inline struct dccp_ackvec *dccp_ackvec_alloc(unsigned int len, | 95 | static inline struct dccp_ackvec *dccp_ackvec_alloc(unsigned int len, |
96 | const unsigned int __nocast priority) | 96 | const gfp_t priority) |
97 | { | 97 | { |
98 | return NULL; | 98 | return NULL; |
99 | } | 99 | } |
diff --git a/net/dccp/ccids/lib/loss_interval.h b/net/dccp/ccids/lib/loss_interval.h index 13ad47ba1420..417d9d82df3e 100644 --- a/net/dccp/ccids/lib/loss_interval.h +++ b/net/dccp/ccids/lib/loss_interval.h | |||
@@ -36,7 +36,7 @@ struct dccp_li_hist_entry { | |||
36 | 36 | ||
37 | static inline struct dccp_li_hist_entry * | 37 | static inline struct dccp_li_hist_entry * |
38 | dccp_li_hist_entry_new(struct dccp_li_hist *hist, | 38 | dccp_li_hist_entry_new(struct dccp_li_hist *hist, |
39 | const unsigned int __nocast prio) | 39 | const gfp_t prio) |
40 | { | 40 | { |
41 | return kmem_cache_alloc(hist->dccplih_slab, prio); | 41 | return kmem_cache_alloc(hist->dccplih_slab, prio); |
42 | } | 42 | } |
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h index b375ebdb7dcf..122e96737ff6 100644 --- a/net/dccp/ccids/lib/packet_history.h +++ b/net/dccp/ccids/lib/packet_history.h | |||
@@ -86,7 +86,7 @@ extern struct dccp_rx_hist_entry * | |||
86 | 86 | ||
87 | static inline struct dccp_tx_hist_entry * | 87 | static inline struct dccp_tx_hist_entry * |
88 | dccp_tx_hist_entry_new(struct dccp_tx_hist *hist, | 88 | dccp_tx_hist_entry_new(struct dccp_tx_hist *hist, |
89 | const unsigned int __nocast prio) | 89 | const gfp_t prio) |
90 | { | 90 | { |
91 | struct dccp_tx_hist_entry *entry = kmem_cache_alloc(hist->dccptxh_slab, | 91 | struct dccp_tx_hist_entry *entry = kmem_cache_alloc(hist->dccptxh_slab, |
92 | prio); | 92 | prio); |
@@ -137,7 +137,7 @@ static inline struct dccp_rx_hist_entry * | |||
137 | const struct sock *sk, | 137 | const struct sock *sk, |
138 | const u32 ndp, | 138 | const u32 ndp, |
139 | const struct sk_buff *skb, | 139 | const struct sk_buff *skb, |
140 | const unsigned int __nocast prio) | 140 | const gfp_t prio) |
141 | { | 141 | { |
142 | struct dccp_rx_hist_entry *entry = kmem_cache_alloc(hist->dccprxh_slab, | 142 | struct dccp_rx_hist_entry *entry = kmem_cache_alloc(hist->dccprxh_slab, |
143 | prio); | 143 | prio); |
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 34d4128d56d5..1186dc44cdff 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -452,8 +452,7 @@ static struct proto dn_proto = { | |||
452 | .obj_size = sizeof(struct dn_sock), | 452 | .obj_size = sizeof(struct dn_sock), |
453 | }; | 453 | }; |
454 | 454 | ||
455 | static struct sock *dn_alloc_sock(struct socket *sock, | 455 | static struct sock *dn_alloc_sock(struct socket *sock, gfp_t gfp) |
456 | unsigned int __nocast gfp) | ||
457 | { | 456 | { |
458 | struct dn_scp *scp; | 457 | struct dn_scp *scp; |
459 | struct sock *sk = sk_alloc(PF_DECnet, gfp, &dn_proto, 1); | 458 | struct sock *sk = sk_alloc(PF_DECnet, gfp, &dn_proto, 1); |
@@ -805,8 +804,7 @@ static int dn_auto_bind(struct socket *sock) | |||
805 | return rv; | 804 | return rv; |
806 | } | 805 | } |
807 | 806 | ||
808 | static int dn_confirm_accept(struct sock *sk, long *timeo, | 807 | static int dn_confirm_accept(struct sock *sk, long *timeo, gfp_t allocation) |
809 | unsigned int __nocast allocation) | ||
810 | { | 808 | { |
811 | struct dn_scp *scp = DN_SK(sk); | 809 | struct dn_scp *scp = DN_SK(sk); |
812 | DEFINE_WAIT(wait); | 810 | DEFINE_WAIT(wait); |
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c index cd08244aa10c..c96c767b1f74 100644 --- a/net/decnet/dn_nsp_out.c +++ b/net/decnet/dn_nsp_out.c | |||
@@ -117,8 +117,7 @@ try_again: | |||
117 | * The eventual aim is for each socket to have a cached header size | 117 | * The eventual aim is for each socket to have a cached header size |
118 | * for its outgoing packets, and to set hdr from this when sk != NULL. | 118 | * for its outgoing packets, and to set hdr from this when sk != NULL. |
119 | */ | 119 | */ |
120 | struct sk_buff *dn_alloc_skb(struct sock *sk, int size, | 120 | struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri) |
121 | unsigned int __nocast pri) | ||
122 | { | 121 | { |
123 | struct sk_buff *skb; | 122 | struct sk_buff *skb; |
124 | int hdr = 64; | 123 | int hdr = 64; |
@@ -212,7 +211,7 @@ static void dn_nsp_rtt(struct sock *sk, long rtt) | |||
212 | * Returns: The number of times the packet has been sent previously | 211 | * Returns: The number of times the packet has been sent previously |
213 | */ | 212 | */ |
214 | static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb, | 213 | static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb, |
215 | unsigned int __nocast gfp) | 214 | gfp_t gfp) |
216 | { | 215 | { |
217 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 216 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
218 | struct sk_buff *skb2; | 217 | struct sk_buff *skb2; |
@@ -353,7 +352,7 @@ static unsigned short *dn_nsp_mk_data_header(struct sock *sk, struct sk_buff *sk | |||
353 | } | 352 | } |
354 | 353 | ||
355 | void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, | 354 | void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, |
356 | unsigned int __nocast gfp, int oth) | 355 | gfp_t gfp, int oth) |
357 | { | 356 | { |
358 | struct dn_scp *scp = DN_SK(sk); | 357 | struct dn_scp *scp = DN_SK(sk); |
359 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 358 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
@@ -520,7 +519,7 @@ static int dn_nsp_retrans_conn_conf(struct sock *sk) | |||
520 | return 0; | 519 | return 0; |
521 | } | 520 | } |
522 | 521 | ||
523 | void dn_send_conn_conf(struct sock *sk, unsigned int __nocast gfp) | 522 | void dn_send_conn_conf(struct sock *sk, gfp_t gfp) |
524 | { | 523 | { |
525 | struct dn_scp *scp = DN_SK(sk); | 524 | struct dn_scp *scp = DN_SK(sk); |
526 | struct sk_buff *skb = NULL; | 525 | struct sk_buff *skb = NULL; |
@@ -552,7 +551,7 @@ void dn_send_conn_conf(struct sock *sk, unsigned int __nocast gfp) | |||
552 | 551 | ||
553 | 552 | ||
554 | static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, | 553 | static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, |
555 | unsigned short reason, unsigned int __nocast gfp, | 554 | unsigned short reason, gfp_t gfp, |
556 | struct dst_entry *dst, | 555 | struct dst_entry *dst, |
557 | int ddl, unsigned char *dd, __u16 rem, __u16 loc) | 556 | int ddl, unsigned char *dd, __u16 rem, __u16 loc) |
558 | { | 557 | { |
@@ -595,7 +594,7 @@ static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, | |||
595 | 594 | ||
596 | 595 | ||
597 | void dn_nsp_send_disc(struct sock *sk, unsigned char msgflg, | 596 | void dn_nsp_send_disc(struct sock *sk, unsigned char msgflg, |
598 | unsigned short reason, unsigned int __nocast gfp) | 597 | unsigned short reason, gfp_t gfp) |
599 | { | 598 | { |
600 | struct dn_scp *scp = DN_SK(sk); | 599 | struct dn_scp *scp = DN_SK(sk); |
601 | int ddl = 0; | 600 | int ddl = 0; |
@@ -616,7 +615,7 @@ void dn_nsp_return_disc(struct sk_buff *skb, unsigned char msgflg, | |||
616 | { | 615 | { |
617 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 616 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
618 | int ddl = 0; | 617 | int ddl = 0; |
619 | unsigned int __nocast gfp = GFP_ATOMIC; | 618 | gfp_t gfp = GFP_ATOMIC; |
620 | 619 | ||
621 | dn_nsp_do_disc(NULL, msgflg, reason, gfp, skb->dst, ddl, | 620 | dn_nsp_do_disc(NULL, msgflg, reason, gfp, skb->dst, ddl, |
622 | NULL, cb->src_port, cb->dst_port); | 621 | NULL, cb->src_port, cb->dst_port); |
@@ -628,7 +627,7 @@ void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval) | |||
628 | struct dn_scp *scp = DN_SK(sk); | 627 | struct dn_scp *scp = DN_SK(sk); |
629 | struct sk_buff *skb; | 628 | struct sk_buff *skb; |
630 | unsigned char *ptr; | 629 | unsigned char *ptr; |
631 | unsigned int __nocast gfp = GFP_ATOMIC; | 630 | gfp_t gfp = GFP_ATOMIC; |
632 | 631 | ||
633 | if ((skb = dn_alloc_skb(sk, DN_MAX_NSP_DATA_HEADER + 2, gfp)) == NULL) | 632 | if ((skb = dn_alloc_skb(sk, DN_MAX_NSP_DATA_HEADER + 2, gfp)) == NULL) |
634 | return; | 633 | return; |
@@ -663,8 +662,7 @@ void dn_nsp_send_conninit(struct sock *sk, unsigned char msgflg) | |||
663 | unsigned char menuver; | 662 | unsigned char menuver; |
664 | struct dn_skb_cb *cb; | 663 | struct dn_skb_cb *cb; |
665 | unsigned char type = 1; | 664 | unsigned char type = 1; |
666 | unsigned int __nocast allocation = | 665 | gfp_t allocation = (msgflg == NSP_CI) ? sk->sk_allocation : GFP_ATOMIC; |
667 | (msgflg == NSP_CI) ? sk->sk_allocation : GFP_ATOMIC; | ||
668 | struct sk_buff *skb = dn_alloc_skb(sk, 200, allocation); | 666 | struct sk_buff *skb = dn_alloc_skb(sk, 200, allocation); |
669 | 667 | ||
670 | if (!skb) | 668 | if (!skb) |
diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c index ecdf9f7a538f..eed07bbbe6b6 100644 --- a/net/ieee80211/ieee80211_tx.c +++ b/net/ieee80211/ieee80211_tx.c | |||
@@ -207,7 +207,7 @@ void ieee80211_txb_free(struct ieee80211_txb *txb) | |||
207 | } | 207 | } |
208 | 208 | ||
209 | static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size, | 209 | static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size, |
210 | unsigned int __nocast gfp_mask) | 210 | gfp_t gfp_mask) |
211 | { | 211 | { |
212 | struct ieee80211_txb *txb; | 212 | struct ieee80211_txb *txb; |
213 | int i; | 213 | int i; |
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index fe3c6d3d0c91..94468a76c5b4 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -494,7 +494,7 @@ void inet_csk_reqsk_queue_prune(struct sock *parent, | |||
494 | EXPORT_SYMBOL_GPL(inet_csk_reqsk_queue_prune); | 494 | EXPORT_SYMBOL_GPL(inet_csk_reqsk_queue_prune); |
495 | 495 | ||
496 | struct sock *inet_csk_clone(struct sock *sk, const struct request_sock *req, | 496 | struct sock *inet_csk_clone(struct sock *sk, const struct request_sock *req, |
497 | const unsigned int __nocast priority) | 497 | const gfp_t priority) |
498 | { | 498 | { |
499 | struct sock *newsk = sk_clone(sk, priority); | 499 | struct sock *newsk = sk_clone(sk, priority); |
500 | 500 | ||
diff --git a/net/ipv4/ipvs/ip_vs_app.c b/net/ipv4/ipvs/ip_vs_app.c index b942ff3c8860..fc6f95aaa969 100644 --- a/net/ipv4/ipvs/ip_vs_app.c +++ b/net/ipv4/ipvs/ip_vs_app.c | |||
@@ -604,7 +604,7 @@ static struct file_operations ip_vs_app_fops = { | |||
604 | /* | 604 | /* |
605 | * Replace a segment of data with a new segment | 605 | * Replace a segment of data with a new segment |
606 | */ | 606 | */ |
607 | int ip_vs_skb_replace(struct sk_buff *skb, unsigned int __nocast pri, | 607 | int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri, |
608 | char *o_buf, int o_len, char *n_buf, int n_len) | 608 | char *o_buf, int o_len, char *n_buf, int n_len) |
609 | { | 609 | { |
610 | struct iphdr *iph; | 610 | struct iphdr *iph; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index c5b911f9b662..8225e4257258 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1610,7 +1610,7 @@ void tcp_send_fin(struct sock *sk) | |||
1610 | * was unread data in the receive queue. This behavior is recommended | 1610 | * was unread data in the receive queue. This behavior is recommended |
1611 | * by draft-ietf-tcpimpl-prob-03.txt section 3.10. -DaveM | 1611 | * by draft-ietf-tcpimpl-prob-03.txt section 3.10. -DaveM |
1612 | */ | 1612 | */ |
1613 | void tcp_send_active_reset(struct sock *sk, unsigned int __nocast priority) | 1613 | void tcp_send_active_reset(struct sock *sk, gfp_t priority) |
1614 | { | 1614 | { |
1615 | struct tcp_sock *tp = tcp_sk(sk); | 1615 | struct tcp_sock *tp = tcp_sk(sk); |
1616 | struct sk_buff *skb; | 1616 | struct sk_buff *skb; |
diff --git a/net/key/af_key.c b/net/key/af_key.c index bbf0f69181ba..39031684b65c 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -185,7 +185,7 @@ static int pfkey_release(struct socket *sock) | |||
185 | } | 185 | } |
186 | 186 | ||
187 | static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2, | 187 | static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2, |
188 | unsigned int __nocast allocation, struct sock *sk) | 188 | gfp_t allocation, struct sock *sk) |
189 | { | 189 | { |
190 | int err = -ENOBUFS; | 190 | int err = -ENOBUFS; |
191 | 191 | ||
@@ -217,7 +217,7 @@ static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2, | |||
217 | #define BROADCAST_ONE 1 | 217 | #define BROADCAST_ONE 1 |
218 | #define BROADCAST_REGISTERED 2 | 218 | #define BROADCAST_REGISTERED 2 |
219 | #define BROADCAST_PROMISC_ONLY 4 | 219 | #define BROADCAST_PROMISC_ONLY 4 |
220 | static int pfkey_broadcast(struct sk_buff *skb, unsigned int __nocast allocation, | 220 | static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation, |
221 | int broadcast_flags, struct sock *one_sk) | 221 | int broadcast_flags, struct sock *one_sk) |
222 | { | 222 | { |
223 | struct sock *sk; | 223 | struct sock *sk; |
@@ -1417,7 +1417,7 @@ static int pfkey_get(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, | |||
1417 | } | 1417 | } |
1418 | 1418 | ||
1419 | static struct sk_buff *compose_sadb_supported(struct sadb_msg *orig, | 1419 | static struct sk_buff *compose_sadb_supported(struct sadb_msg *orig, |
1420 | unsigned int __nocast allocation) | 1420 | gfp_t allocation) |
1421 | { | 1421 | { |
1422 | struct sk_buff *skb; | 1422 | struct sk_buff *skb; |
1423 | struct sadb_msg *hdr; | 1423 | struct sadb_msg *hdr; |
diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c index 042b24a8ca4c..c761c15da421 100644 --- a/net/llc/llc_conn.c +++ b/net/llc/llc_conn.c | |||
@@ -867,8 +867,7 @@ static void llc_sk_init(struct sock* sk) | |||
867 | * Allocates a LLC sock and initializes it. Returns the new LLC sock | 867 | * Allocates a LLC sock and initializes it. Returns the new LLC sock |
868 | * or %NULL if there's no memory available for one | 868 | * or %NULL if there's no memory available for one |
869 | */ | 869 | */ |
870 | struct sock *llc_sk_alloc(int family, unsigned int __nocast priority, | 870 | struct sock *llc_sk_alloc(int family, gfp_t priority, struct proto *prot) |
871 | struct proto *prot) | ||
872 | { | 871 | { |
873 | struct sock *sk = sk_alloc(family, priority, prot, 1); | 872 | struct sock *sk = sk_alloc(family, priority, prot, 1); |
874 | 873 | ||
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c index 34d671974a4d..1caaca06f698 100644 --- a/net/netfilter/nfnetlink.c +++ b/net/netfilter/nfnetlink.c | |||
@@ -195,8 +195,7 @@ nfnetlink_check_attributes(struct nfnetlink_subsystem *subsys, | |||
195 | 195 | ||
196 | int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, int echo) | 196 | int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, int echo) |
197 | { | 197 | { |
198 | unsigned int __nocast allocation = | 198 | gfp_t allocation = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL; |
199 | in_interrupt() ? GFP_ATOMIC : GFP_KERNEL; | ||
200 | int err = 0; | 199 | int err = 0; |
201 | 200 | ||
202 | NETLINK_CB(skb).dst_group = group; | 201 | NETLINK_CB(skb).dst_group = group; |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index a64e1d5ce3ca..678c3f2c0d0b 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -758,7 +758,7 @@ void netlink_detachskb(struct sock *sk, struct sk_buff *skb) | |||
758 | } | 758 | } |
759 | 759 | ||
760 | static inline struct sk_buff *netlink_trim(struct sk_buff *skb, | 760 | static inline struct sk_buff *netlink_trim(struct sk_buff *skb, |
761 | unsigned int __nocast allocation) | 761 | gfp_t allocation) |
762 | { | 762 | { |
763 | int delta; | 763 | int delta; |
764 | 764 | ||
@@ -880,7 +880,7 @@ out: | |||
880 | } | 880 | } |
881 | 881 | ||
882 | int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid, | 882 | int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid, |
883 | u32 group, unsigned int __nocast allocation) | 883 | u32 group, gfp_t allocation) |
884 | { | 884 | { |
885 | struct netlink_broadcast_data info; | 885 | struct netlink_broadcast_data info; |
886 | struct hlist_node *node; | 886 | struct hlist_node *node; |
diff --git a/net/rxrpc/call.c b/net/rxrpc/call.c index 86f777052633..c4aeb7d40266 100644 --- a/net/rxrpc/call.c +++ b/net/rxrpc/call.c | |||
@@ -1923,7 +1923,7 @@ int rxrpc_call_write_data(struct rxrpc_call *call, | |||
1923 | size_t sioc, | 1923 | size_t sioc, |
1924 | struct kvec *siov, | 1924 | struct kvec *siov, |
1925 | u8 rxhdr_flags, | 1925 | u8 rxhdr_flags, |
1926 | unsigned int __nocast alloc_flags, | 1926 | gfp_t alloc_flags, |
1927 | int dup_data, | 1927 | int dup_data, |
1928 | size_t *size_sent) | 1928 | size_t *size_sent) |
1929 | { | 1929 | { |
diff --git a/net/rxrpc/connection.c b/net/rxrpc/connection.c index be4b2be58956..2ba14a75dbbe 100644 --- a/net/rxrpc/connection.c +++ b/net/rxrpc/connection.c | |||
@@ -522,7 +522,7 @@ int rxrpc_conn_newmsg(struct rxrpc_connection *conn, | |||
522 | uint8_t type, | 522 | uint8_t type, |
523 | int dcount, | 523 | int dcount, |
524 | struct kvec diov[], | 524 | struct kvec diov[], |
525 | unsigned int __nocast alloc_flags, | 525 | gfp_t alloc_flags, |
526 | struct rxrpc_message **_msg) | 526 | struct rxrpc_message **_msg) |
527 | { | 527 | { |
528 | struct rxrpc_message *msg; | 528 | struct rxrpc_message *msg; |
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 5b24ae0650d3..12b0f582a66b 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -71,7 +71,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a | |||
71 | const struct sctp_endpoint *ep, | 71 | const struct sctp_endpoint *ep, |
72 | const struct sock *sk, | 72 | const struct sock *sk, |
73 | sctp_scope_t scope, | 73 | sctp_scope_t scope, |
74 | unsigned int __nocast gfp) | 74 | gfp_t gfp) |
75 | { | 75 | { |
76 | struct sctp_sock *sp; | 76 | struct sctp_sock *sp; |
77 | int i; | 77 | int i; |
@@ -273,7 +273,7 @@ fail_init: | |||
273 | struct sctp_association *sctp_association_new(const struct sctp_endpoint *ep, | 273 | struct sctp_association *sctp_association_new(const struct sctp_endpoint *ep, |
274 | const struct sock *sk, | 274 | const struct sock *sk, |
275 | sctp_scope_t scope, | 275 | sctp_scope_t scope, |
276 | unsigned int __nocast gfp) | 276 | gfp_t gfp) |
277 | { | 277 | { |
278 | struct sctp_association *asoc; | 278 | struct sctp_association *asoc; |
279 | 279 | ||
@@ -479,7 +479,7 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc, | |||
479 | /* Add a transport address to an association. */ | 479 | /* Add a transport address to an association. */ |
480 | struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, | 480 | struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, |
481 | const union sctp_addr *addr, | 481 | const union sctp_addr *addr, |
482 | const unsigned int __nocast gfp, | 482 | const gfp_t gfp, |
483 | const int peer_state) | 483 | const int peer_state) |
484 | { | 484 | { |
485 | struct sctp_transport *peer; | 485 | struct sctp_transport *peer; |
@@ -1231,7 +1231,7 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned len) | |||
1231 | * local endpoint and the remote peer. | 1231 | * local endpoint and the remote peer. |
1232 | */ | 1232 | */ |
1233 | int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc, | 1233 | int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc, |
1234 | unsigned int __nocast gfp) | 1234 | gfp_t gfp) |
1235 | { | 1235 | { |
1236 | sctp_scope_t scope; | 1236 | sctp_scope_t scope; |
1237 | int flags; | 1237 | int flags; |
@@ -1254,7 +1254,7 @@ int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc, | |||
1254 | /* Build the association's bind address list from the cookie. */ | 1254 | /* Build the association's bind address list from the cookie. */ |
1255 | int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *asoc, | 1255 | int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *asoc, |
1256 | struct sctp_cookie *cookie, | 1256 | struct sctp_cookie *cookie, |
1257 | unsigned int __nocast gfp) | 1257 | gfp_t gfp) |
1258 | { | 1258 | { |
1259 | int var_size2 = ntohs(cookie->peer_init->chunk_hdr.length); | 1259 | int var_size2 = ntohs(cookie->peer_init->chunk_hdr.length); |
1260 | int var_size3 = cookie->raw_addr_list_len; | 1260 | int var_size3 = cookie->raw_addr_list_len; |
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index f71549710f2e..2b962627f631 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c | |||
@@ -53,7 +53,7 @@ | |||
53 | 53 | ||
54 | /* Forward declarations for internal helpers. */ | 54 | /* Forward declarations for internal helpers. */ |
55 | static int sctp_copy_one_addr(struct sctp_bind_addr *, union sctp_addr *, | 55 | static int sctp_copy_one_addr(struct sctp_bind_addr *, union sctp_addr *, |
56 | sctp_scope_t scope, unsigned int __nocast gfp, | 56 | sctp_scope_t scope, gfp_t gfp, |
57 | int flags); | 57 | int flags); |
58 | static void sctp_bind_addr_clean(struct sctp_bind_addr *); | 58 | static void sctp_bind_addr_clean(struct sctp_bind_addr *); |
59 | 59 | ||
@@ -64,7 +64,7 @@ static void sctp_bind_addr_clean(struct sctp_bind_addr *); | |||
64 | */ | 64 | */ |
65 | int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | 65 | int sctp_bind_addr_copy(struct sctp_bind_addr *dest, |
66 | const struct sctp_bind_addr *src, | 66 | const struct sctp_bind_addr *src, |
67 | sctp_scope_t scope, unsigned int __nocast gfp, | 67 | sctp_scope_t scope, gfp_t gfp, |
68 | int flags) | 68 | int flags) |
69 | { | 69 | { |
70 | struct sctp_sockaddr_entry *addr; | 70 | struct sctp_sockaddr_entry *addr; |
@@ -146,7 +146,7 @@ void sctp_bind_addr_free(struct sctp_bind_addr *bp) | |||
146 | 146 | ||
147 | /* Add an address to the bind address list in the SCTP_bind_addr structure. */ | 147 | /* Add an address to the bind address list in the SCTP_bind_addr structure. */ |
148 | int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new, | 148 | int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new, |
149 | unsigned int __nocast gfp) | 149 | gfp_t gfp) |
150 | { | 150 | { |
151 | struct sctp_sockaddr_entry *addr; | 151 | struct sctp_sockaddr_entry *addr; |
152 | 152 | ||
@@ -200,7 +200,7 @@ int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr) | |||
200 | */ | 200 | */ |
201 | union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, | 201 | union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, |
202 | int *addrs_len, | 202 | int *addrs_len, |
203 | unsigned int __nocast gfp) | 203 | gfp_t gfp) |
204 | { | 204 | { |
205 | union sctp_params addrparms; | 205 | union sctp_params addrparms; |
206 | union sctp_params retval; | 206 | union sctp_params retval; |
@@ -252,7 +252,7 @@ end_raw: | |||
252 | * address parameters). | 252 | * address parameters). |
253 | */ | 253 | */ |
254 | int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw_addr_list, | 254 | int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw_addr_list, |
255 | int addrs_len, __u16 port, unsigned int __nocast gfp) | 255 | int addrs_len, __u16 port, gfp_t gfp) |
256 | { | 256 | { |
257 | union sctp_addr_param *rawaddr; | 257 | union sctp_addr_param *rawaddr; |
258 | struct sctp_paramhdr *param; | 258 | struct sctp_paramhdr *param; |
@@ -350,7 +350,7 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, | |||
350 | /* Copy out addresses from the global local address list. */ | 350 | /* Copy out addresses from the global local address list. */ |
351 | static int sctp_copy_one_addr(struct sctp_bind_addr *dest, | 351 | static int sctp_copy_one_addr(struct sctp_bind_addr *dest, |
352 | union sctp_addr *addr, | 352 | union sctp_addr *addr, |
353 | sctp_scope_t scope, unsigned int __nocast gfp, | 353 | sctp_scope_t scope, gfp_t gfp, |
354 | int flags) | 354 | int flags) |
355 | { | 355 | { |
356 | int error = 0; | 356 | int error = 0; |
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c index 61da2937e641..83ef411772f4 100644 --- a/net/sctp/chunk.c +++ b/net/sctp/chunk.c | |||
@@ -62,7 +62,7 @@ static void sctp_datamsg_init(struct sctp_datamsg *msg) | |||
62 | } | 62 | } |
63 | 63 | ||
64 | /* Allocate and initialize datamsg. */ | 64 | /* Allocate and initialize datamsg. */ |
65 | SCTP_STATIC struct sctp_datamsg *sctp_datamsg_new(unsigned int __nocast gfp) | 65 | SCTP_STATIC struct sctp_datamsg *sctp_datamsg_new(gfp_t gfp) |
66 | { | 66 | { |
67 | struct sctp_datamsg *msg; | 67 | struct sctp_datamsg *msg; |
68 | msg = kmalloc(sizeof(struct sctp_datamsg), gfp); | 68 | msg = kmalloc(sizeof(struct sctp_datamsg), gfp); |
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index e22ccd655965..96984f7a2d69 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c | |||
@@ -68,7 +68,7 @@ static void sctp_endpoint_bh_rcv(struct sctp_endpoint *ep); | |||
68 | */ | 68 | */ |
69 | static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, | 69 | static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, |
70 | struct sock *sk, | 70 | struct sock *sk, |
71 | unsigned int __nocast gfp) | 71 | gfp_t gfp) |
72 | { | 72 | { |
73 | struct sctp_sock *sp = sctp_sk(sk); | 73 | struct sctp_sock *sp = sctp_sk(sk); |
74 | memset(ep, 0, sizeof(struct sctp_endpoint)); | 74 | memset(ep, 0, sizeof(struct sctp_endpoint)); |
@@ -138,8 +138,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, | |||
138 | /* Create a sctp_endpoint with all that boring stuff initialized. | 138 | /* Create a sctp_endpoint with all that boring stuff initialized. |
139 | * Returns NULL if there isn't enough memory. | 139 | * Returns NULL if there isn't enough memory. |
140 | */ | 140 | */ |
141 | struct sctp_endpoint *sctp_endpoint_new(struct sock *sk, | 141 | struct sctp_endpoint *sctp_endpoint_new(struct sock *sk, gfp_t gfp) |
142 | unsigned int __nocast gfp) | ||
143 | { | 142 | { |
144 | struct sctp_endpoint *ep; | 143 | struct sctp_endpoint *ep; |
145 | 144 | ||
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index f01d1c9002a1..26de4d3e1bd9 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -219,7 +219,7 @@ static void sctp_free_local_addr_list(void) | |||
219 | 219 | ||
220 | /* Copy the local addresses which are valid for 'scope' into 'bp'. */ | 220 | /* Copy the local addresses which are valid for 'scope' into 'bp'. */ |
221 | int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope, | 221 | int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope, |
222 | unsigned int __nocast gfp, int copy_flags) | 222 | gfp_t gfp, int copy_flags) |
223 | { | 223 | { |
224 | struct sctp_sockaddr_entry *addr; | 224 | struct sctp_sockaddr_entry *addr; |
225 | int error = 0; | 225 | int error = 0; |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 3868a8d70cc0..10e82ec2ebd3 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -78,7 +78,7 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep, | |||
78 | static int sctp_process_param(struct sctp_association *asoc, | 78 | static int sctp_process_param(struct sctp_association *asoc, |
79 | union sctp_params param, | 79 | union sctp_params param, |
80 | const union sctp_addr *peer_addr, | 80 | const union sctp_addr *peer_addr, |
81 | unsigned int __nocast gfp); | 81 | gfp_t gfp); |
82 | 82 | ||
83 | /* What was the inbound interface for this chunk? */ | 83 | /* What was the inbound interface for this chunk? */ |
84 | int sctp_chunk_iif(const struct sctp_chunk *chunk) | 84 | int sctp_chunk_iif(const struct sctp_chunk *chunk) |
@@ -174,7 +174,7 @@ void sctp_init_cause(struct sctp_chunk *chunk, __u16 cause_code, | |||
174 | */ | 174 | */ |
175 | struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, | 175 | struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, |
176 | const struct sctp_bind_addr *bp, | 176 | const struct sctp_bind_addr *bp, |
177 | unsigned int __nocast gfp, int vparam_len) | 177 | gfp_t gfp, int vparam_len) |
178 | { | 178 | { |
179 | sctp_inithdr_t init; | 179 | sctp_inithdr_t init; |
180 | union sctp_params addrs; | 180 | union sctp_params addrs; |
@@ -261,7 +261,7 @@ nodata: | |||
261 | 261 | ||
262 | struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, | 262 | struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, |
263 | const struct sctp_chunk *chunk, | 263 | const struct sctp_chunk *chunk, |
264 | unsigned int __nocast gfp, int unkparam_len) | 264 | gfp_t gfp, int unkparam_len) |
265 | { | 265 | { |
266 | sctp_inithdr_t initack; | 266 | sctp_inithdr_t initack; |
267 | struct sctp_chunk *retval; | 267 | struct sctp_chunk *retval; |
@@ -1234,7 +1234,7 @@ void sctp_chunk_assign_tsn(struct sctp_chunk *chunk) | |||
1234 | /* Create a CLOSED association to use with an incoming packet. */ | 1234 | /* Create a CLOSED association to use with an incoming packet. */ |
1235 | struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep, | 1235 | struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep, |
1236 | struct sctp_chunk *chunk, | 1236 | struct sctp_chunk *chunk, |
1237 | unsigned int __nocast gfp) | 1237 | gfp_t gfp) |
1238 | { | 1238 | { |
1239 | struct sctp_association *asoc; | 1239 | struct sctp_association *asoc; |
1240 | struct sk_buff *skb; | 1240 | struct sk_buff *skb; |
@@ -1349,7 +1349,7 @@ nodata: | |||
1349 | struct sctp_association *sctp_unpack_cookie( | 1349 | struct sctp_association *sctp_unpack_cookie( |
1350 | const struct sctp_endpoint *ep, | 1350 | const struct sctp_endpoint *ep, |
1351 | const struct sctp_association *asoc, | 1351 | const struct sctp_association *asoc, |
1352 | struct sctp_chunk *chunk, unsigned int __nocast gfp, | 1352 | struct sctp_chunk *chunk, gfp_t gfp, |
1353 | int *error, struct sctp_chunk **errp) | 1353 | int *error, struct sctp_chunk **errp) |
1354 | { | 1354 | { |
1355 | struct sctp_association *retval = NULL; | 1355 | struct sctp_association *retval = NULL; |
@@ -1814,7 +1814,7 @@ int sctp_verify_init(const struct sctp_association *asoc, | |||
1814 | */ | 1814 | */ |
1815 | int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid, | 1815 | int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid, |
1816 | const union sctp_addr *peer_addr, | 1816 | const union sctp_addr *peer_addr, |
1817 | sctp_init_chunk_t *peer_init, unsigned int __nocast gfp) | 1817 | sctp_init_chunk_t *peer_init, gfp_t gfp) |
1818 | { | 1818 | { |
1819 | union sctp_params param; | 1819 | union sctp_params param; |
1820 | struct sctp_transport *transport; | 1820 | struct sctp_transport *transport; |
@@ -1985,7 +1985,7 @@ nomem: | |||
1985 | static int sctp_process_param(struct sctp_association *asoc, | 1985 | static int sctp_process_param(struct sctp_association *asoc, |
1986 | union sctp_params param, | 1986 | union sctp_params param, |
1987 | const union sctp_addr *peer_addr, | 1987 | const union sctp_addr *peer_addr, |
1988 | unsigned int __nocast gfp) | 1988 | gfp_t gfp) |
1989 | { | 1989 | { |
1990 | union sctp_addr addr; | 1990 | union sctp_addr addr; |
1991 | int i; | 1991 | int i; |
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 39c970b5b198..f84173ea8ec1 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -63,7 +63,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, | |||
63 | void *event_arg, | 63 | void *event_arg, |
64 | sctp_disposition_t status, | 64 | sctp_disposition_t status, |
65 | sctp_cmd_seq_t *commands, | 65 | sctp_cmd_seq_t *commands, |
66 | unsigned int __nocast gfp); | 66 | gfp_t gfp); |
67 | static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, | 67 | static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, |
68 | sctp_state_t state, | 68 | sctp_state_t state, |
69 | struct sctp_endpoint *ep, | 69 | struct sctp_endpoint *ep, |
@@ -71,7 +71,7 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, | |||
71 | void *event_arg, | 71 | void *event_arg, |
72 | sctp_disposition_t status, | 72 | sctp_disposition_t status, |
73 | sctp_cmd_seq_t *commands, | 73 | sctp_cmd_seq_t *commands, |
74 | unsigned int __nocast gfp); | 74 | gfp_t gfp); |
75 | 75 | ||
76 | /******************************************************************** | 76 | /******************************************************************** |
77 | * Helper functions | 77 | * Helper functions |
@@ -498,7 +498,7 @@ static int sctp_cmd_process_init(sctp_cmd_seq_t *commands, | |||
498 | struct sctp_association *asoc, | 498 | struct sctp_association *asoc, |
499 | struct sctp_chunk *chunk, | 499 | struct sctp_chunk *chunk, |
500 | sctp_init_chunk_t *peer_init, | 500 | sctp_init_chunk_t *peer_init, |
501 | unsigned int __nocast gfp) | 501 | gfp_t gfp) |
502 | { | 502 | { |
503 | int error; | 503 | int error; |
504 | 504 | ||
@@ -853,7 +853,7 @@ int sctp_do_sm(sctp_event_t event_type, sctp_subtype_t subtype, | |||
853 | struct sctp_endpoint *ep, | 853 | struct sctp_endpoint *ep, |
854 | struct sctp_association *asoc, | 854 | struct sctp_association *asoc, |
855 | void *event_arg, | 855 | void *event_arg, |
856 | unsigned int __nocast gfp) | 856 | gfp_t gfp) |
857 | { | 857 | { |
858 | sctp_cmd_seq_t commands; | 858 | sctp_cmd_seq_t commands; |
859 | const sctp_sm_table_entry_t *state_fn; | 859 | const sctp_sm_table_entry_t *state_fn; |
@@ -898,7 +898,7 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, | |||
898 | void *event_arg, | 898 | void *event_arg, |
899 | sctp_disposition_t status, | 899 | sctp_disposition_t status, |
900 | sctp_cmd_seq_t *commands, | 900 | sctp_cmd_seq_t *commands, |
901 | unsigned int __nocast gfp) | 901 | gfp_t gfp) |
902 | { | 902 | { |
903 | int error; | 903 | int error; |
904 | 904 | ||
@@ -986,7 +986,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, | |||
986 | void *event_arg, | 986 | void *event_arg, |
987 | sctp_disposition_t status, | 987 | sctp_disposition_t status, |
988 | sctp_cmd_seq_t *commands, | 988 | sctp_cmd_seq_t *commands, |
989 | unsigned int __nocast gfp) | 989 | gfp_t gfp) |
990 | { | 990 | { |
991 | int error = 0; | 991 | int error = 0; |
992 | int force; | 992 | int force; |
diff --git a/net/sctp/ssnmap.c b/net/sctp/ssnmap.c index 25037daf3fa0..cbe2513d2822 100644 --- a/net/sctp/ssnmap.c +++ b/net/sctp/ssnmap.c | |||
@@ -58,7 +58,7 @@ static inline size_t sctp_ssnmap_size(__u16 in, __u16 out) | |||
58 | * Allocate room to store at least 'len' contiguous TSNs. | 58 | * Allocate room to store at least 'len' contiguous TSNs. |
59 | */ | 59 | */ |
60 | struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out, | 60 | struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out, |
61 | unsigned int __nocast gfp) | 61 | gfp_t gfp) |
62 | { | 62 | { |
63 | struct sctp_ssnmap *retval; | 63 | struct sctp_ssnmap *retval; |
64 | int size; | 64 | int size; |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index d2f04ebe5081..6bc27200e6ca 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -57,7 +57,7 @@ | |||
57 | /* Initialize a new transport from provided memory. */ | 57 | /* Initialize a new transport from provided memory. */ |
58 | static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, | 58 | static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, |
59 | const union sctp_addr *addr, | 59 | const union sctp_addr *addr, |
60 | unsigned int __nocast gfp) | 60 | gfp_t gfp) |
61 | { | 61 | { |
62 | /* Copy in the address. */ | 62 | /* Copy in the address. */ |
63 | peer->ipaddr = *addr; | 63 | peer->ipaddr = *addr; |
@@ -122,7 +122,7 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, | |||
122 | 122 | ||
123 | /* Allocate and initialize a new transport. */ | 123 | /* Allocate and initialize a new transport. */ |
124 | struct sctp_transport *sctp_transport_new(const union sctp_addr *addr, | 124 | struct sctp_transport *sctp_transport_new(const union sctp_addr *addr, |
125 | unsigned int __nocast gfp) | 125 | gfp_t gfp) |
126 | { | 126 | { |
127 | struct sctp_transport *transport; | 127 | struct sctp_transport *transport; |
128 | 128 | ||
diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c index 0abd5101107c..057e7fac3af0 100644 --- a/net/sctp/ulpevent.c +++ b/net/sctp/ulpevent.c | |||
@@ -74,7 +74,7 @@ SCTP_STATIC void sctp_ulpevent_init(struct sctp_ulpevent *event, int msg_flags) | |||
74 | 74 | ||
75 | /* Create a new sctp_ulpevent. */ | 75 | /* Create a new sctp_ulpevent. */ |
76 | SCTP_STATIC struct sctp_ulpevent *sctp_ulpevent_new(int size, int msg_flags, | 76 | SCTP_STATIC struct sctp_ulpevent *sctp_ulpevent_new(int size, int msg_flags, |
77 | unsigned int __nocast gfp) | 77 | gfp_t gfp) |
78 | { | 78 | { |
79 | struct sctp_ulpevent *event; | 79 | struct sctp_ulpevent *event; |
80 | struct sk_buff *skb; | 80 | struct sk_buff *skb; |
@@ -136,7 +136,7 @@ static inline void sctp_ulpevent_release_owner(struct sctp_ulpevent *event) | |||
136 | struct sctp_ulpevent *sctp_ulpevent_make_assoc_change( | 136 | struct sctp_ulpevent *sctp_ulpevent_make_assoc_change( |
137 | const struct sctp_association *asoc, | 137 | const struct sctp_association *asoc, |
138 | __u16 flags, __u16 state, __u16 error, __u16 outbound, | 138 | __u16 flags, __u16 state, __u16 error, __u16 outbound, |
139 | __u16 inbound, unsigned int __nocast gfp) | 139 | __u16 inbound, gfp_t gfp) |
140 | { | 140 | { |
141 | struct sctp_ulpevent *event; | 141 | struct sctp_ulpevent *event; |
142 | struct sctp_assoc_change *sac; | 142 | struct sctp_assoc_change *sac; |
@@ -237,7 +237,7 @@ fail: | |||
237 | struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change( | 237 | struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change( |
238 | const struct sctp_association *asoc, | 238 | const struct sctp_association *asoc, |
239 | const struct sockaddr_storage *aaddr, | 239 | const struct sockaddr_storage *aaddr, |
240 | int flags, int state, int error, unsigned int __nocast gfp) | 240 | int flags, int state, int error, gfp_t gfp) |
241 | { | 241 | { |
242 | struct sctp_ulpevent *event; | 242 | struct sctp_ulpevent *event; |
243 | struct sctp_paddr_change *spc; | 243 | struct sctp_paddr_change *spc; |
@@ -350,7 +350,7 @@ fail: | |||
350 | */ | 350 | */ |
351 | struct sctp_ulpevent *sctp_ulpevent_make_remote_error( | 351 | struct sctp_ulpevent *sctp_ulpevent_make_remote_error( |
352 | const struct sctp_association *asoc, struct sctp_chunk *chunk, | 352 | const struct sctp_association *asoc, struct sctp_chunk *chunk, |
353 | __u16 flags, unsigned int __nocast gfp) | 353 | __u16 flags, gfp_t gfp) |
354 | { | 354 | { |
355 | struct sctp_ulpevent *event; | 355 | struct sctp_ulpevent *event; |
356 | struct sctp_remote_error *sre; | 356 | struct sctp_remote_error *sre; |
@@ -448,7 +448,7 @@ fail: | |||
448 | */ | 448 | */ |
449 | struct sctp_ulpevent *sctp_ulpevent_make_send_failed( | 449 | struct sctp_ulpevent *sctp_ulpevent_make_send_failed( |
450 | const struct sctp_association *asoc, struct sctp_chunk *chunk, | 450 | const struct sctp_association *asoc, struct sctp_chunk *chunk, |
451 | __u16 flags, __u32 error, unsigned int __nocast gfp) | 451 | __u16 flags, __u32 error, gfp_t gfp) |
452 | { | 452 | { |
453 | struct sctp_ulpevent *event; | 453 | struct sctp_ulpevent *event; |
454 | struct sctp_send_failed *ssf; | 454 | struct sctp_send_failed *ssf; |
@@ -557,7 +557,7 @@ fail: | |||
557 | */ | 557 | */ |
558 | struct sctp_ulpevent *sctp_ulpevent_make_shutdown_event( | 558 | struct sctp_ulpevent *sctp_ulpevent_make_shutdown_event( |
559 | const struct sctp_association *asoc, | 559 | const struct sctp_association *asoc, |
560 | __u16 flags, unsigned int __nocast gfp) | 560 | __u16 flags, gfp_t gfp) |
561 | { | 561 | { |
562 | struct sctp_ulpevent *event; | 562 | struct sctp_ulpevent *event; |
563 | struct sctp_shutdown_event *sse; | 563 | struct sctp_shutdown_event *sse; |
@@ -620,7 +620,7 @@ fail: | |||
620 | * 5.3.1.6 SCTP_ADAPTION_INDICATION | 620 | * 5.3.1.6 SCTP_ADAPTION_INDICATION |
621 | */ | 621 | */ |
622 | struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication( | 622 | struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication( |
623 | const struct sctp_association *asoc, unsigned int __nocast gfp) | 623 | const struct sctp_association *asoc, gfp_t gfp) |
624 | { | 624 | { |
625 | struct sctp_ulpevent *event; | 625 | struct sctp_ulpevent *event; |
626 | struct sctp_adaption_event *sai; | 626 | struct sctp_adaption_event *sai; |
@@ -657,7 +657,7 @@ fail: | |||
657 | */ | 657 | */ |
658 | struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, | 658 | struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, |
659 | struct sctp_chunk *chunk, | 659 | struct sctp_chunk *chunk, |
660 | unsigned int __nocast gfp) | 660 | gfp_t gfp) |
661 | { | 661 | { |
662 | struct sctp_ulpevent *event = NULL; | 662 | struct sctp_ulpevent *event = NULL; |
663 | struct sk_buff *skb; | 663 | struct sk_buff *skb; |
@@ -719,7 +719,7 @@ fail: | |||
719 | */ | 719 | */ |
720 | struct sctp_ulpevent *sctp_ulpevent_make_pdapi( | 720 | struct sctp_ulpevent *sctp_ulpevent_make_pdapi( |
721 | const struct sctp_association *asoc, __u32 indication, | 721 | const struct sctp_association *asoc, __u32 indication, |
722 | unsigned int __nocast gfp) | 722 | gfp_t gfp) |
723 | { | 723 | { |
724 | struct sctp_ulpevent *event; | 724 | struct sctp_ulpevent *event; |
725 | struct sctp_pdapi_event *pd; | 725 | struct sctp_pdapi_event *pd; |
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c index ec2c857eae7f..2080b2d28c98 100644 --- a/net/sctp/ulpqueue.c +++ b/net/sctp/ulpqueue.c | |||
@@ -100,7 +100,7 @@ void sctp_ulpq_free(struct sctp_ulpq *ulpq) | |||
100 | 100 | ||
101 | /* Process an incoming DATA chunk. */ | 101 | /* Process an incoming DATA chunk. */ |
102 | int sctp_ulpq_tail_data(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk, | 102 | int sctp_ulpq_tail_data(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk, |
103 | unsigned int __nocast gfp) | 103 | gfp_t gfp) |
104 | { | 104 | { |
105 | struct sk_buff_head temp; | 105 | struct sk_buff_head temp; |
106 | sctp_data_chunk_t *hdr; | 106 | sctp_data_chunk_t *hdr; |
@@ -792,7 +792,7 @@ static __u16 sctp_ulpq_renege_frags(struct sctp_ulpq *ulpq, __u16 needed) | |||
792 | /* Partial deliver the first message as there is pressure on rwnd. */ | 792 | /* Partial deliver the first message as there is pressure on rwnd. */ |
793 | void sctp_ulpq_partial_delivery(struct sctp_ulpq *ulpq, | 793 | void sctp_ulpq_partial_delivery(struct sctp_ulpq *ulpq, |
794 | struct sctp_chunk *chunk, | 794 | struct sctp_chunk *chunk, |
795 | unsigned int __nocast gfp) | 795 | gfp_t gfp) |
796 | { | 796 | { |
797 | struct sctp_ulpevent *event; | 797 | struct sctp_ulpevent *event; |
798 | struct sctp_association *asoc; | 798 | struct sctp_association *asoc; |
@@ -816,7 +816,7 @@ void sctp_ulpq_partial_delivery(struct sctp_ulpq *ulpq, | |||
816 | 816 | ||
817 | /* Renege some packets to make room for an incoming chunk. */ | 817 | /* Renege some packets to make room for an incoming chunk. */ |
818 | void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk, | 818 | void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk, |
819 | unsigned int __nocast gfp) | 819 | gfp_t gfp) |
820 | { | 820 | { |
821 | struct sctp_association *asoc; | 821 | struct sctp_association *asoc; |
822 | __u16 needed, freed; | 822 | __u16 needed, freed; |
@@ -855,7 +855,7 @@ void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk, | |||
855 | /* Notify the application if an association is aborted and in | 855 | /* Notify the application if an association is aborted and in |
856 | * partial delivery mode. Send up any pending received messages. | 856 | * partial delivery mode. Send up any pending received messages. |
857 | */ | 857 | */ |
858 | void sctp_ulpq_abort_pd(struct sctp_ulpq *ulpq, unsigned int __nocast gfp) | 858 | void sctp_ulpq_abort_pd(struct sctp_ulpq *ulpq, gfp_t gfp) |
859 | { | 859 | { |
860 | struct sctp_ulpevent *ev = NULL; | 860 | struct sctp_ulpevent *ev = NULL; |
861 | struct sock *sk; | 861 | struct sock *sk; |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index ade730eaf401..54e60a657500 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -719,7 +719,7 @@ static void rpc_async_schedule(void *arg) | |||
719 | void * | 719 | void * |
720 | rpc_malloc(struct rpc_task *task, size_t size) | 720 | rpc_malloc(struct rpc_task *task, size_t size) |
721 | { | 721 | { |
722 | unsigned int __nocast gfp; | 722 | gfp_t gfp; |
723 | 723 | ||
724 | if (task->tk_flags & RPC_TASK_SWAPPER) | 724 | if (task->tk_flags & RPC_TASK_SWAPPER) |
725 | gfp = GFP_ATOMIC; | 725 | gfp = GFP_ATOMIC; |
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 061b44cc2451..cbb0ba34a600 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -225,7 +225,7 @@ expired: | |||
225 | * SPD calls. | 225 | * SPD calls. |
226 | */ | 226 | */ |
227 | 227 | ||
228 | struct xfrm_policy *xfrm_policy_alloc(unsigned int __nocast gfp) | 228 | struct xfrm_policy *xfrm_policy_alloc(gfp_t gfp) |
229 | { | 229 | { |
230 | struct xfrm_policy *policy; | 230 | struct xfrm_policy *policy; |
231 | 231 | ||