diff options
author | Jianjun Kong <jianjun@zeuux.org> | 2008-11-03 03:24:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-03 03:24:34 -0500 |
commit | 5a5f3a8db9d70c90e9d55b46e02b2d8deb1c2c2e (patch) | |
tree | 051b35d2766bf5285a695b82d527cc3c2d77f435 /net | |
parent | d9319100c1ad7d0ed4045ded767684ad25670436 (diff) |
net: clean up net/ipv4/ipip.c raw.c tcp.c tcp_minisocks.c tcp_yeah.c xfrm4_policy.c
Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ipip.c | 2 | ||||
-rw-r--r-- | net/ipv4/raw.c | 8 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 6 | ||||
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_yeah.c | 4 | ||||
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 29609d29df76..b3c3d7b0d116 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -281,7 +281,7 @@ static int ipip_err(struct sk_buff *skb, u32 info) | |||
281 | 8 bytes of packet payload. It means, that precise relaying of | 281 | 8 bytes of packet payload. It means, that precise relaying of |
282 | ICMP in the real Internet is absolutely infeasible. | 282 | ICMP in the real Internet is absolutely infeasible. |
283 | */ | 283 | */ |
284 | struct iphdr *iph = (struct iphdr*)skb->data; | 284 | struct iphdr *iph = (struct iphdr *)skb->data; |
285 | const int type = icmp_hdr(skb)->type; | 285 | const int type = icmp_hdr(skb)->type; |
286 | const int code = icmp_hdr(skb)->code; | 286 | const int code = icmp_hdr(skb)->code; |
287 | struct ip_tunnel *t; | 287 | struct ip_tunnel *t; |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index cd975743bcd2..998fcffc9e15 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -247,7 +247,7 @@ static void raw_err(struct sock *sk, struct sk_buff *skb, u32 info) | |||
247 | } | 247 | } |
248 | 248 | ||
249 | if (inet->recverr) { | 249 | if (inet->recverr) { |
250 | struct iphdr *iph = (struct iphdr*)skb->data; | 250 | struct iphdr *iph = (struct iphdr *)skb->data; |
251 | u8 *payload = skb->data + (iph->ihl << 2); | 251 | u8 *payload = skb->data + (iph->ihl << 2); |
252 | 252 | ||
253 | if (inet->hdrincl) | 253 | if (inet->hdrincl) |
@@ -465,7 +465,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
465 | */ | 465 | */ |
466 | 466 | ||
467 | if (msg->msg_namelen) { | 467 | if (msg->msg_namelen) { |
468 | struct sockaddr_in *usin = (struct sockaddr_in*)msg->msg_name; | 468 | struct sockaddr_in *usin = (struct sockaddr_in *)msg->msg_name; |
469 | err = -EINVAL; | 469 | err = -EINVAL; |
470 | if (msg->msg_namelen < sizeof(*usin)) | 470 | if (msg->msg_namelen < sizeof(*usin)) |
471 | goto out; | 471 | goto out; |
@@ -851,7 +851,7 @@ struct proto raw_prot = { | |||
851 | static struct sock *raw_get_first(struct seq_file *seq) | 851 | static struct sock *raw_get_first(struct seq_file *seq) |
852 | { | 852 | { |
853 | struct sock *sk; | 853 | struct sock *sk; |
854 | struct raw_iter_state* state = raw_seq_private(seq); | 854 | struct raw_iter_state *state = raw_seq_private(seq); |
855 | 855 | ||
856 | for (state->bucket = 0; state->bucket < RAW_HTABLE_SIZE; | 856 | for (state->bucket = 0; state->bucket < RAW_HTABLE_SIZE; |
857 | ++state->bucket) { | 857 | ++state->bucket) { |
@@ -868,7 +868,7 @@ found: | |||
868 | 868 | ||
869 | static struct sock *raw_get_next(struct seq_file *seq, struct sock *sk) | 869 | static struct sock *raw_get_next(struct seq_file *seq, struct sock *sk) |
870 | { | 870 | { |
871 | struct raw_iter_state* state = raw_seq_private(seq); | 871 | struct raw_iter_state *state = raw_seq_private(seq); |
872 | 872 | ||
873 | do { | 873 | do { |
874 | sk = sk_next(sk); | 874 | sk = sk_next(sk); |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index eccb7165a80c..60c28add96b8 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1681,7 +1681,7 @@ void tcp_set_state(struct sock *sk, int state) | |||
1681 | inet_put_port(sk); | 1681 | inet_put_port(sk); |
1682 | /* fall through */ | 1682 | /* fall through */ |
1683 | default: | 1683 | default: |
1684 | if (oldstate==TCP_ESTABLISHED) | 1684 | if (oldstate == TCP_ESTABLISHED) |
1685 | TCP_DEC_STATS(sock_net(sk), TCP_MIB_CURRESTAB); | 1685 | TCP_DEC_STATS(sock_net(sk), TCP_MIB_CURRESTAB); |
1686 | } | 1686 | } |
1687 | 1687 | ||
@@ -1691,7 +1691,7 @@ void tcp_set_state(struct sock *sk, int state) | |||
1691 | sk->sk_state = state; | 1691 | sk->sk_state = state; |
1692 | 1692 | ||
1693 | #ifdef STATE_TRACE | 1693 | #ifdef STATE_TRACE |
1694 | SOCK_DEBUG(sk, "TCP sk=%p, State %s -> %s\n",sk, statename[oldstate],statename[state]); | 1694 | SOCK_DEBUG(sk, "TCP sk=%p, State %s -> %s\n", sk, statename[oldstate], statename[state]); |
1695 | #endif | 1695 | #endif |
1696 | } | 1696 | } |
1697 | EXPORT_SYMBOL_GPL(tcp_set_state); | 1697 | EXPORT_SYMBOL_GPL(tcp_set_state); |
@@ -2651,7 +2651,7 @@ EXPORT_SYMBOL(tcp_md5_hash_key); | |||
2651 | 2651 | ||
2652 | void tcp_done(struct sock *sk) | 2652 | void tcp_done(struct sock *sk) |
2653 | { | 2653 | { |
2654 | if(sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) | 2654 | if (sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) |
2655 | TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_ATTEMPTFAILS); | 2655 | TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_ATTEMPTFAILS); |
2656 | 2656 | ||
2657 | tcp_set_state(sk, TCP_CLOSE); | 2657 | tcp_set_state(sk, TCP_CLOSE); |
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 779f2e9d0689..f67effbb102b 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -491,7 +491,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req, | |||
491 | * as a request_sock. | 491 | * as a request_sock. |
492 | */ | 492 | */ |
493 | 493 | ||
494 | struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb, | 494 | struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb, |
495 | struct request_sock *req, | 495 | struct request_sock *req, |
496 | struct request_sock **prev) | 496 | struct request_sock **prev) |
497 | { | 497 | { |
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c index e03b10183a8b..9ec843a9bbb2 100644 --- a/net/ipv4/tcp_yeah.c +++ b/net/ipv4/tcp_yeah.c | |||
@@ -83,7 +83,7 @@ static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
83 | else if (!yeah->doing_reno_now) { | 83 | else if (!yeah->doing_reno_now) { |
84 | /* Scalable */ | 84 | /* Scalable */ |
85 | 85 | ||
86 | tp->snd_cwnd_cnt+=yeah->pkts_acked; | 86 | tp->snd_cwnd_cnt += yeah->pkts_acked; |
87 | if (tp->snd_cwnd_cnt > min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT)){ | 87 | if (tp->snd_cwnd_cnt > min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT)){ |
88 | if (tp->snd_cwnd < tp->snd_cwnd_clamp) | 88 | if (tp->snd_cwnd < tp->snd_cwnd_clamp) |
89 | tp->snd_cwnd++; | 89 | tp->snd_cwnd++; |
@@ -224,7 +224,7 @@ static u32 tcp_yeah_ssthresh(struct sock *sk) { | |||
224 | 224 | ||
225 | reduction = max( reduction, tp->snd_cwnd >> TCP_YEAH_DELTA); | 225 | reduction = max( reduction, tp->snd_cwnd >> TCP_YEAH_DELTA); |
226 | } else | 226 | } else |
227 | reduction = max(tp->snd_cwnd>>1,2U); | 227 | reduction = max(tp->snd_cwnd>>1, 2U); |
228 | 228 | ||
229 | yeah->fast_count = 0; | 229 | yeah->fast_count = 0; |
230 | yeah->reno_count = max(yeah->reno_count>>1, 2U); | 230 | yeah->reno_count = max(yeah->reno_count>>1, 2U); |
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index c63de0a72aba..f9a775b7e796 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -65,7 +65,7 @@ __xfrm4_find_bundle(struct flowi *fl, struct xfrm_policy *policy) | |||
65 | 65 | ||
66 | read_lock_bh(&policy->lock); | 66 | read_lock_bh(&policy->lock); |
67 | for (dst = policy->bundles; dst; dst = dst->next) { | 67 | for (dst = policy->bundles; dst; dst = dst->next) { |
68 | struct xfrm_dst *xdst = (struct xfrm_dst*)dst; | 68 | struct xfrm_dst *xdst = (struct xfrm_dst *)dst; |
69 | if (xdst->u.rt.fl.oif == fl->oif && /*XXX*/ | 69 | if (xdst->u.rt.fl.oif == fl->oif && /*XXX*/ |
70 | xdst->u.rt.fl.fl4_dst == fl->fl4_dst && | 70 | xdst->u.rt.fl.fl4_dst == fl->fl4_dst && |
71 | xdst->u.rt.fl.fl4_src == fl->fl4_src && | 71 | xdst->u.rt.fl.fl4_src == fl->fl4_src && |