diff options
author | Randy Dunlap <rdunlap@xenotime.net> | 2005-10-05 01:41:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-10-05 01:41:48 -0400 |
commit | f4a19a56e38442e434b8809915d756469f1e89a2 (patch) | |
tree | b96445dc6aecdd303e6405cabd7c050eafdf12c8 /net/decnet/dn_nsp_out.c | |
parent | 17b698856328a42d5874ac87640e2cd84a824eef (diff) |
[DECNET]: fix sparse gfp nocast warnings
Fix implicit nocast warnings in decnet code:
net/decnet/af_decnet.c:458:40: warning: implicit cast to nocast type
net/decnet/dn_nsp_out.c:125:35: warning: implicit cast to nocast type
net/decnet/dn_nsp_out.c:219:29: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_nsp_out.c')
-rw-r--r-- | net/decnet/dn_nsp_out.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c index 53633d352868..cd08244aa10c 100644 --- a/net/decnet/dn_nsp_out.c +++ b/net/decnet/dn_nsp_out.c | |||
@@ -117,7 +117,8 @@ 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, int pri) | 120 | struct sk_buff *dn_alloc_skb(struct sock *sk, int size, |
121 | unsigned int __nocast pri) | ||
121 | { | 122 | { |
122 | struct sk_buff *skb; | 123 | struct sk_buff *skb; |
123 | int hdr = 64; | 124 | int hdr = 64; |
@@ -210,7 +211,8 @@ static void dn_nsp_rtt(struct sock *sk, long rtt) | |||
210 | * | 211 | * |
211 | * Returns: The number of times the packet has been sent previously | 212 | * Returns: The number of times the packet has been sent previously |
212 | */ | 213 | */ |
213 | static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb, int gfp) | 214 | static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb, |
215 | unsigned int __nocast gfp) | ||
214 | { | 216 | { |
215 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 217 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
216 | struct sk_buff *skb2; | 218 | struct sk_buff *skb2; |
@@ -350,7 +352,8 @@ static unsigned short *dn_nsp_mk_data_header(struct sock *sk, struct sk_buff *sk | |||
350 | return ptr; | 352 | return ptr; |
351 | } | 353 | } |
352 | 354 | ||
353 | void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, int gfp, int oth) | 355 | void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, |
356 | unsigned int __nocast gfp, int oth) | ||
354 | { | 357 | { |
355 | struct dn_scp *scp = DN_SK(sk); | 358 | struct dn_scp *scp = DN_SK(sk); |
356 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 359 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
@@ -517,7 +520,7 @@ static int dn_nsp_retrans_conn_conf(struct sock *sk) | |||
517 | return 0; | 520 | return 0; |
518 | } | 521 | } |
519 | 522 | ||
520 | void dn_send_conn_conf(struct sock *sk, int gfp) | 523 | void dn_send_conn_conf(struct sock *sk, unsigned int __nocast gfp) |
521 | { | 524 | { |
522 | struct dn_scp *scp = DN_SK(sk); | 525 | struct dn_scp *scp = DN_SK(sk); |
523 | struct sk_buff *skb = NULL; | 526 | struct sk_buff *skb = NULL; |
@@ -549,7 +552,8 @@ void dn_send_conn_conf(struct sock *sk, int gfp) | |||
549 | 552 | ||
550 | 553 | ||
551 | static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, | 554 | static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, |
552 | unsigned short reason, int gfp, struct dst_entry *dst, | 555 | unsigned short reason, unsigned int __nocast gfp, |
556 | struct dst_entry *dst, | ||
553 | int ddl, unsigned char *dd, __u16 rem, __u16 loc) | 557 | int ddl, unsigned char *dd, __u16 rem, __u16 loc) |
554 | { | 558 | { |
555 | struct sk_buff *skb = NULL; | 559 | struct sk_buff *skb = NULL; |
@@ -591,7 +595,7 @@ static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, | |||
591 | 595 | ||
592 | 596 | ||
593 | void dn_nsp_send_disc(struct sock *sk, unsigned char msgflg, | 597 | void dn_nsp_send_disc(struct sock *sk, unsigned char msgflg, |
594 | unsigned short reason, int gfp) | 598 | unsigned short reason, unsigned int __nocast gfp) |
595 | { | 599 | { |
596 | struct dn_scp *scp = DN_SK(sk); | 600 | struct dn_scp *scp = DN_SK(sk); |
597 | int ddl = 0; | 601 | int ddl = 0; |
@@ -612,7 +616,7 @@ void dn_nsp_return_disc(struct sk_buff *skb, unsigned char msgflg, | |||
612 | { | 616 | { |
613 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 617 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
614 | int ddl = 0; | 618 | int ddl = 0; |
615 | int gfp = GFP_ATOMIC; | 619 | unsigned int __nocast gfp = GFP_ATOMIC; |
616 | 620 | ||
617 | dn_nsp_do_disc(NULL, msgflg, reason, gfp, skb->dst, ddl, | 621 | dn_nsp_do_disc(NULL, msgflg, reason, gfp, skb->dst, ddl, |
618 | NULL, cb->src_port, cb->dst_port); | 622 | NULL, cb->src_port, cb->dst_port); |
@@ -624,7 +628,7 @@ void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval) | |||
624 | struct dn_scp *scp = DN_SK(sk); | 628 | struct dn_scp *scp = DN_SK(sk); |
625 | struct sk_buff *skb; | 629 | struct sk_buff *skb; |
626 | unsigned char *ptr; | 630 | unsigned char *ptr; |
627 | int gfp = GFP_ATOMIC; | 631 | unsigned int __nocast gfp = GFP_ATOMIC; |
628 | 632 | ||
629 | if ((skb = dn_alloc_skb(sk, DN_MAX_NSP_DATA_HEADER + 2, gfp)) == NULL) | 633 | if ((skb = dn_alloc_skb(sk, DN_MAX_NSP_DATA_HEADER + 2, gfp)) == NULL) |
630 | return; | 634 | return; |
@@ -659,7 +663,8 @@ void dn_nsp_send_conninit(struct sock *sk, unsigned char msgflg) | |||
659 | unsigned char menuver; | 663 | unsigned char menuver; |
660 | struct dn_skb_cb *cb; | 664 | struct dn_skb_cb *cb; |
661 | unsigned char type = 1; | 665 | unsigned char type = 1; |
662 | int allocation = (msgflg == NSP_CI) ? sk->sk_allocation : GFP_ATOMIC; | 666 | unsigned int __nocast allocation = |
667 | (msgflg == NSP_CI) ? sk->sk_allocation : GFP_ATOMIC; | ||
663 | struct sk_buff *skb = dn_alloc_skb(sk, 200, allocation); | 668 | struct sk_buff *skb = dn_alloc_skb(sk, 200, allocation); |
664 | 669 | ||
665 | if (!skb) | 670 | if (!skb) |