diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-15 00:40:42 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:23:38 -0500 |
commit | b51655b958dfb1176bfcf99466231fdbef8751ff (patch) | |
tree | a53d0ec00d8db4169ba8c1c487fffbd34d6dde03 /net | |
parent | b1550f221255f7dd06048d832bf0f3d166840e1c (diff) |
[NET]: Annotate __skb_checksum_complete() and friends.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/datagram.c | 2 | ||||
-rw-r--r-- | net/core/netpoll.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter.c | 4 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/net/core/datagram.c b/net/core/datagram.c index 0d9c9bac4006..797fdd4352ce 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c | |||
@@ -411,7 +411,7 @@ fault: | |||
411 | return -EFAULT; | 411 | return -EFAULT; |
412 | } | 412 | } |
413 | 413 | ||
414 | unsigned int __skb_checksum_complete(struct sk_buff *skb) | 414 | __sum16 __skb_checksum_complete(struct sk_buff *skb) |
415 | { | 415 | { |
416 | __sum16 sum; | 416 | __sum16 sum; |
417 | 417 | ||
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 26ee1791aa02..8be3681d3d80 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -77,8 +77,8 @@ static void queue_process(void *p) | |||
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | static int checksum_udp(struct sk_buff *skb, struct udphdr *uh, | 80 | static __sum16 checksum_udp(struct sk_buff *skb, struct udphdr *uh, |
81 | unsigned short ulen, __be32 saddr, __be32 daddr) | 81 | unsigned short ulen, __be32 saddr, __be32 daddr) |
82 | { | 82 | { |
83 | __wsum psum; | 83 | __wsum psum; |
84 | 84 | ||
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c index b797a37c01ce..a68966059b50 100644 --- a/net/ipv4/netfilter.c +++ b/net/ipv4/netfilter.c | |||
@@ -162,11 +162,11 @@ static int nf_ip_reroute(struct sk_buff **pskb, const struct nf_info *info) | |||
162 | return 0; | 162 | return 0; |
163 | } | 163 | } |
164 | 164 | ||
165 | unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook, | 165 | __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook, |
166 | unsigned int dataoff, u_int8_t protocol) | 166 | unsigned int dataoff, u_int8_t protocol) |
167 | { | 167 | { |
168 | struct iphdr *iph = skb->nh.iph; | 168 | struct iphdr *iph = skb->nh.iph; |
169 | unsigned int csum = 0; | 169 | __sum16 csum = 0; |
170 | 170 | ||
171 | switch (skb->ip_summed) { | 171 | switch (skb->ip_summed) { |
172 | case CHECKSUM_COMPLETE: | 172 | case CHECKSUM_COMPLETE: |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 6ab3423674bb..9304034c0c47 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3790,9 +3790,9 @@ static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen) | |||
3790 | return err; | 3790 | return err; |
3791 | } | 3791 | } |
3792 | 3792 | ||
3793 | static int __tcp_checksum_complete_user(struct sock *sk, struct sk_buff *skb) | 3793 | static __sum16 __tcp_checksum_complete_user(struct sock *sk, struct sk_buff *skb) |
3794 | { | 3794 | { |
3795 | int result; | 3795 | __sum16 result; |
3796 | 3796 | ||
3797 | if (sock_owned_by_user(sk)) { | 3797 | if (sock_owned_by_user(sk)) { |
3798 | local_bh_enable(); | 3798 | local_bh_enable(); |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 0ca8dead03b0..dadf80272413 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1544,7 +1544,7 @@ static struct sock *tcp_v4_hnd_req(struct sock *sk, struct sk_buff *skb) | |||
1544 | return sk; | 1544 | return sk; |
1545 | } | 1545 | } |
1546 | 1546 | ||
1547 | static int tcp_v4_checksum_init(struct sk_buff *skb) | 1547 | static __sum16 tcp_v4_checksum_init(struct sk_buff *skb) |
1548 | { | 1548 | { |
1549 | if (skb->ip_summed == CHECKSUM_COMPLETE) { | 1549 | if (skb->ip_summed == CHECKSUM_COMPLETE) { |
1550 | if (!tcp_v4_check(skb->h.th, skb->len, skb->nh.iph->saddr, | 1550 | if (!tcp_v4_check(skb->h.th, skb->len, skb->nh.iph->saddr, |
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c index 8d1b542806c1..f6294e5bcb31 100644 --- a/net/ipv6/netfilter.c +++ b/net/ipv6/netfilter.c | |||
@@ -80,11 +80,11 @@ static int nf_ip6_reroute(struct sk_buff **pskb, const struct nf_info *info) | |||
80 | return 0; | 80 | return 0; |
81 | } | 81 | } |
82 | 82 | ||
83 | unsigned int nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, | 83 | __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, |
84 | unsigned int dataoff, u_int8_t protocol) | 84 | unsigned int dataoff, u_int8_t protocol) |
85 | { | 85 | { |
86 | struct ipv6hdr *ip6h = skb->nh.ipv6h; | 86 | struct ipv6hdr *ip6h = skb->nh.ipv6h; |
87 | unsigned int csum = 0; | 87 | __sum16 csum = 0; |
88 | 88 | ||
89 | switch (skb->ip_summed) { | 89 | switch (skb->ip_summed) { |
90 | case CHECKSUM_COMPLETE: | 90 | case CHECKSUM_COMPLETE: |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 394bc54c5c21..147ce499f509 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1527,7 +1527,7 @@ out: | |||
1527 | return NULL; | 1527 | return NULL; |
1528 | } | 1528 | } |
1529 | 1529 | ||
1530 | static int tcp_v6_checksum_init(struct sk_buff *skb) | 1530 | static __sum16 tcp_v6_checksum_init(struct sk_buff *skb) |
1531 | { | 1531 | { |
1532 | if (skb->ip_summed == CHECKSUM_COMPLETE) { | 1532 | if (skb->ip_summed == CHECKSUM_COMPLETE) { |
1533 | if (!tcp_v6_check(skb->h.th,skb->len,&skb->nh.ipv6h->saddr, | 1533 | if (!tcp_v6_check(skb->h.th,skb->len,&skb->nh.ipv6h->saddr, |