aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@xenotime.net>2005-10-05 01:41:48 -0400
committerDavid S. Miller <davem@davemloft.net>2005-10-05 01:41:48 -0400
commitf4a19a56e38442e434b8809915d756469f1e89a2 (patch)
treeb96445dc6aecdd303e6405cabd7c050eafdf12c8
parent17b698856328a42d5874ac87640e2cd84a824eef (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>
-rw-r--r--include/net/dn_nsp.h8
-rw-r--r--include/net/dn_route.h2
-rw-r--r--net/decnet/af_decnet.c6
-rw-r--r--net/decnet/dn_nsp_out.c23
4 files changed, 23 insertions, 16 deletions
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h
index 6bbeafa73e8b..8a0891e2e888 100644
--- a/include/net/dn_nsp.h
+++ b/include/net/dn_nsp.h
@@ -19,9 +19,9 @@ extern void dn_nsp_send_data_ack(struct sock *sk);
19extern void dn_nsp_send_oth_ack(struct sock *sk); 19extern void dn_nsp_send_oth_ack(struct sock *sk);
20extern void dn_nsp_delayed_ack(struct sock *sk); 20extern void dn_nsp_delayed_ack(struct sock *sk);
21extern void dn_send_conn_ack(struct sock *sk); 21extern void dn_send_conn_ack(struct sock *sk);
22extern void dn_send_conn_conf(struct sock *sk, int gfp); 22extern void dn_send_conn_conf(struct sock *sk, unsigned int __nocast gfp);
23extern void dn_nsp_send_disc(struct sock *sk, unsigned char type, 23extern void dn_nsp_send_disc(struct sock *sk, unsigned char type,
24 unsigned short reason, int gfp); 24 unsigned short reason, unsigned int __nocast gfp);
25extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type, 25extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type,
26 unsigned short reason); 26 unsigned short reason);
27extern void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval); 27extern void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval);
@@ -29,14 +29,14 @@ extern void dn_nsp_send_conninit(struct sock *sk, unsigned char flags);
29 29
30extern void dn_nsp_output(struct sock *sk); 30extern void dn_nsp_output(struct sock *sk);
31extern int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned short acknum); 31extern int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned short acknum);
32extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, int gfp, int oob); 32extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, unsigned int __nocast gfp, int oob);
33extern unsigned long dn_nsp_persist(struct sock *sk); 33extern unsigned long dn_nsp_persist(struct sock *sk);
34extern int dn_nsp_xmit_timeout(struct sock *sk); 34extern int dn_nsp_xmit_timeout(struct sock *sk);
35 35
36extern int dn_nsp_rx(struct sk_buff *); 36extern int dn_nsp_rx(struct sk_buff *);
37extern int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb); 37extern int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb);
38 38
39extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri); 39extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, unsigned int __nocast pri);
40extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err); 40extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err);
41 41
42#define NSP_REASON_OK 0 /* No error */ 42#define NSP_REASON_OK 0 /* No error */
diff --git a/include/net/dn_route.h b/include/net/dn_route.h
index d084721db198..11fe973cf383 100644
--- a/include/net/dn_route.h
+++ b/include/net/dn_route.h
@@ -15,7 +15,7 @@
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16*******************************************************************************/ 16*******************************************************************************/
17 17
18extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri); 18extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, unsigned int __nocast pri);
19extern int dn_route_output_sock(struct dst_entry **pprt, struct flowi *, struct sock *sk, int flags); 19extern int dn_route_output_sock(struct dst_entry **pprt, struct flowi *, struct sock *sk, int flags);
20extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb); 20extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb);
21extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); 21extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 348f36b529f7..34d4128d56d5 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -452,7 +452,8 @@ static struct proto dn_proto = {
452 .obj_size = sizeof(struct dn_sock), 452 .obj_size = sizeof(struct dn_sock),
453}; 453};
454 454
455static struct sock *dn_alloc_sock(struct socket *sock, int gfp) 455static struct sock *dn_alloc_sock(struct socket *sock,
456 unsigned int __nocast gfp)
456{ 457{
457 struct dn_scp *scp; 458 struct dn_scp *scp;
458 struct sock *sk = sk_alloc(PF_DECnet, gfp, &dn_proto, 1); 459 struct sock *sk = sk_alloc(PF_DECnet, gfp, &dn_proto, 1);
@@ -804,7 +805,8 @@ static int dn_auto_bind(struct socket *sock)
804 return rv; 805 return rv;
805} 806}
806 807
807static int dn_confirm_accept(struct sock *sk, long *timeo, int allocation) 808static int dn_confirm_accept(struct sock *sk, long *timeo,
809 unsigned int __nocast allocation)
808{ 810{
809 struct dn_scp *scp = DN_SK(sk); 811 struct dn_scp *scp = DN_SK(sk);
810 DEFINE_WAIT(wait); 812 DEFINE_WAIT(wait);
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 */
120struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri) 120struct 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 */
213static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb, int gfp) 214static 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
353void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, int gfp, int oth) 355void 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
520void dn_send_conn_conf(struct sock *sk, int gfp) 523void 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
551static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, 554static __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
593void dn_nsp_send_disc(struct sock *sk, unsigned char msgflg, 597void 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)