aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-15 00:24:49 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:23:27 -0500
commitd3bc23e7ee9db8023dff5a86bb3b0069ed018789 (patch)
treef281b190a20084386666e0f3bb957df427b93ca7 /net/ipv4/tcp.c
parent9981a0e36a572e9fcf84bfab915fdc93bed0e3c9 (diff)
[NET]: Annotate callers of csum_fold() in net/*
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index dadef867a3bb..168f9de906bc 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2162,7 +2162,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2162 struct tcphdr *th; 2162 struct tcphdr *th;
2163 unsigned thlen; 2163 unsigned thlen;
2164 unsigned int seq; 2164 unsigned int seq;
2165 unsigned int delta; 2165 __be32 delta;
2166 unsigned int oldlen; 2166 unsigned int oldlen;
2167 unsigned int len; 2167 unsigned int len;
2168 2168
@@ -2215,7 +2215,8 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2215 do { 2215 do {
2216 th->fin = th->psh = 0; 2216 th->fin = th->psh = 0;
2217 2217
2218 th->check = ~csum_fold(th->check + delta); 2218 th->check = ~csum_fold((__force __wsum)((__force u32)th->check +
2219 (__force u32)delta));
2219 if (skb->ip_summed != CHECKSUM_PARTIAL) 2220 if (skb->ip_summed != CHECKSUM_PARTIAL)
2220 th->check = csum_fold(csum_partial(skb->h.raw, thlen, 2221 th->check = csum_fold(csum_partial(skb->h.raw, thlen,
2221 skb->csum)); 2222 skb->csum));
@@ -2229,7 +2230,8 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2229 } while (skb->next); 2230 } while (skb->next);
2230 2231
2231 delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len); 2232 delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len);
2232 th->check = ~csum_fold(th->check + delta); 2233 th->check = ~csum_fold((__force __wsum)((__force u32)th->check +
2234 (__force u32)delta));
2233 if (skb->ip_summed != CHECKSUM_PARTIAL) 2235 if (skb->ip_summed != CHECKSUM_PARTIAL)
2234 th->check = csum_fold(csum_partial(skb->h.raw, thlen, 2236 th->check = csum_fold(csum_partial(skb->h.raw, thlen,
2235 skb->csum)); 2237 skb->csum));