aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2008-11-19 18:44:53 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-19 18:44:53 -0500
commit07f0757a6808f2f36a0e58c3a54867ccffdb8dc9 (patch)
treee04b573c3f1471ff21c6b2499682a620f4db7eae /net/ipv6
parenta7a0d6a87b70f7b2bab5281fc0fd443772bd0795 (diff)
include/net net/ - csum_partial - remove unnecessary casts
The first argument to csum_partial is const void * casts to char/u8 * are not necessary Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/icmp.c4
-rw-r--r--net/ipv6/mcast.c2
-rw-r--r--net/ipv6/ndisc.c4
-rw-r--r--net/ipv6/tcp_ipv6.c6
4 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index be351009fd03..a77b8d103804 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -233,7 +233,7 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct
233 icmp6h->icmp6_cksum = 0; 233 icmp6h->icmp6_cksum = 0;
234 234
235 if (skb_queue_len(&sk->sk_write_queue) == 1) { 235 if (skb_queue_len(&sk->sk_write_queue) == 1) {
236 skb->csum = csum_partial((char *)icmp6h, 236 skb->csum = csum_partial(icmp6h,
237 sizeof(struct icmp6hdr), skb->csum); 237 sizeof(struct icmp6hdr), skb->csum);
238 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src, 238 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src,
239 &fl->fl6_dst, 239 &fl->fl6_dst,
@@ -246,7 +246,7 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct
246 tmp_csum = csum_add(tmp_csum, skb->csum); 246 tmp_csum = csum_add(tmp_csum, skb->csum);
247 } 247 }
248 248
249 tmp_csum = csum_partial((char *)icmp6h, 249 tmp_csum = csum_partial(icmp6h,
250 sizeof(struct icmp6hdr), tmp_csum); 250 sizeof(struct icmp6hdr), tmp_csum);
251 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src, 251 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src,
252 &fl->fl6_dst, 252 &fl->fl6_dst,
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index a76199ecad23..870a1d64605a 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -1817,7 +1817,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
1817 1817
1818 hdr->icmp6_cksum = csum_ipv6_magic(saddr, snd_addr, len, 1818 hdr->icmp6_cksum = csum_ipv6_magic(saddr, snd_addr, len,
1819 IPPROTO_ICMPV6, 1819 IPPROTO_ICMPV6,
1820 csum_partial((__u8 *) hdr, len, 0)); 1820 csum_partial(hdr, len, 0));
1821 1821
1822 idev = in6_dev_get(skb->dev); 1822 idev = in6_dev_get(skb->dev);
1823 1823
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index fbf451c0d77a..af6705f03b5c 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -491,7 +491,7 @@ struct sk_buff *ndisc_build_skb(struct net_device *dev,
491 491
492 hdr->icmp6_cksum = csum_ipv6_magic(saddr, daddr, len, 492 hdr->icmp6_cksum = csum_ipv6_magic(saddr, daddr, len,
493 IPPROTO_ICMPV6, 493 IPPROTO_ICMPV6,
494 csum_partial((__u8 *) hdr, 494 csum_partial(hdr,
495 len, 0)); 495 len, 0));
496 496
497 return skb; 497 return skb;
@@ -1612,7 +1612,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
1612 1612
1613 icmph->icmp6_cksum = csum_ipv6_magic(&saddr_buf, &ipv6_hdr(skb)->saddr, 1613 icmph->icmp6_cksum = csum_ipv6_magic(&saddr_buf, &ipv6_hdr(skb)->saddr,
1614 len, IPPROTO_ICMPV6, 1614 len, IPPROTO_ICMPV6,
1615 csum_partial((u8 *) icmph, len, 0)); 1615 csum_partial(icmph, len, 0));
1616 1616
1617 buff->dst = dst; 1617 buff->dst = dst;
1618 idev = in6_dev_get(dst->dev); 1618 idev = in6_dev_get(dst->dev);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index b35787056313..a5d750acd793 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -501,7 +501,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req)
501 501
502 th->check = tcp_v6_check(th, skb->len, 502 th->check = tcp_v6_check(th, skb->len,
503 &treq->loc_addr, &treq->rmt_addr, 503 &treq->loc_addr, &treq->rmt_addr,
504 csum_partial((char *)th, skb->len, skb->csum)); 504 csum_partial(th, skb->len, skb->csum));
505 505
506 ipv6_addr_copy(&fl.fl6_dst, &treq->rmt_addr); 506 ipv6_addr_copy(&fl.fl6_dst, &treq->rmt_addr);
507 err = ip6_xmit(sk, skb, &fl, opt, 0); 507 err = ip6_xmit(sk, skb, &fl, opt, 0);
@@ -915,7 +915,7 @@ static void tcp_v6_send_check(struct sock *sk, int len, struct sk_buff *skb)
915 skb->csum_offset = offsetof(struct tcphdr, check); 915 skb->csum_offset = offsetof(struct tcphdr, check);
916 } else { 916 } else {
917 th->check = csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP, 917 th->check = csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP,
918 csum_partial((char *)th, th->doff<<2, 918 csum_partial(th, th->doff<<2,
919 skb->csum)); 919 skb->csum));
920 } 920 }
921} 921}
@@ -997,7 +997,7 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win,
997 } 997 }
998#endif 998#endif
999 999
1000 buff->csum = csum_partial((char *)t1, tot_len, 0); 1000 buff->csum = csum_partial(t1, tot_len, 0);
1001 1001
1002 memset(&fl, 0, sizeof(fl)); 1002 memset(&fl, 0, sizeof(fl));
1003 ipv6_addr_copy(&fl.fl6_dst, &ipv6_hdr(skb)->saddr); 1003 ipv6_addr_copy(&fl.fl6_dst, &ipv6_hdr(skb)->saddr);