Commit 5a5f3a8db9d70c90e9d55b46e02b2d8deb1c2c2e
Committed by
David S. Miller
1 parent
d9319100c1
Exists in
master
and in
7 other branches
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>
Showing 6 changed files with 12 additions and 12 deletions Side-by-side Diff
net/ipv4/ipip.c
... | ... | @@ -281,7 +281,7 @@ |
281 | 281 | 8 bytes of packet payload. It means, that precise relaying of |
282 | 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 | 285 | const int type = icmp_hdr(skb)->type; |
286 | 286 | const int code = icmp_hdr(skb)->code; |
287 | 287 | struct ip_tunnel *t; |
net/ipv4/raw.c
... | ... | @@ -247,7 +247,7 @@ |
247 | 247 | } |
248 | 248 | |
249 | 249 | if (inet->recverr) { |
250 | - struct iphdr *iph = (struct iphdr*)skb->data; | |
250 | + struct iphdr *iph = (struct iphdr *)skb->data; | |
251 | 251 | u8 *payload = skb->data + (iph->ihl << 2); |
252 | 252 | |
253 | 253 | if (inet->hdrincl) |
... | ... | @@ -465,7 +465,7 @@ |
465 | 465 | */ |
466 | 466 | |
467 | 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 | 469 | err = -EINVAL; |
470 | 470 | if (msg->msg_namelen < sizeof(*usin)) |
471 | 471 | goto out; |
... | ... | @@ -851,7 +851,7 @@ |
851 | 851 | static struct sock *raw_get_first(struct seq_file *seq) |
852 | 852 | { |
853 | 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 | 856 | for (state->bucket = 0; state->bucket < RAW_HTABLE_SIZE; |
857 | 857 | ++state->bucket) { |
... | ... | @@ -868,7 +868,7 @@ |
868 | 868 | |
869 | 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 | 873 | do { |
874 | 874 | sk = sk_next(sk); |
net/ipv4/tcp.c
... | ... | @@ -1681,7 +1681,7 @@ |
1681 | 1681 | inet_put_port(sk); |
1682 | 1682 | /* fall through */ |
1683 | 1683 | default: |
1684 | - if (oldstate==TCP_ESTABLISHED) | |
1684 | + if (oldstate == TCP_ESTABLISHED) | |
1685 | 1685 | TCP_DEC_STATS(sock_net(sk), TCP_MIB_CURRESTAB); |
1686 | 1686 | } |
1687 | 1687 | |
... | ... | @@ -1691,7 +1691,7 @@ |
1691 | 1691 | sk->sk_state = state; |
1692 | 1692 | |
1693 | 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 | 1695 | #endif |
1696 | 1696 | } |
1697 | 1697 | EXPORT_SYMBOL_GPL(tcp_set_state); |
... | ... | @@ -2651,7 +2651,7 @@ |
2651 | 2651 | |
2652 | 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 | 2655 | TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_ATTEMPTFAILS); |
2656 | 2656 | |
2657 | 2657 | tcp_set_state(sk, TCP_CLOSE); |
net/ipv4/tcp_minisocks.c
net/ipv4/tcp_yeah.c
... | ... | @@ -83,7 +83,7 @@ |
83 | 83 | else if (!yeah->doing_reno_now) { |
84 | 84 | /* Scalable */ |
85 | 85 | |
86 | - tp->snd_cwnd_cnt+=yeah->pkts_acked; | |
86 | + tp->snd_cwnd_cnt += yeah->pkts_acked; | |
87 | 87 | if (tp->snd_cwnd_cnt > min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT)){ |
88 | 88 | if (tp->snd_cwnd < tp->snd_cwnd_clamp) |
89 | 89 | tp->snd_cwnd++; |
... | ... | @@ -224,7 +224,7 @@ |
224 | 224 | |
225 | 225 | reduction = max( reduction, tp->snd_cwnd >> TCP_YEAH_DELTA); |
226 | 226 | } else |
227 | - reduction = max(tp->snd_cwnd>>1,2U); | |
227 | + reduction = max(tp->snd_cwnd>>1, 2U); | |
228 | 228 | |
229 | 229 | yeah->fast_count = 0; |
230 | 230 | yeah->reno_count = max(yeah->reno_count>>1, 2U); |
net/ipv4/xfrm4_policy.c
... | ... | @@ -65,7 +65,7 @@ |
65 | 65 | |
66 | 66 | read_lock_bh(&policy->lock); |
67 | 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 | 69 | if (xdst->u.rt.fl.oif == fl->oif && /*XXX*/ |
70 | 70 | xdst->u.rt.fl.fl4_dst == fl->fl4_dst && |
71 | 71 | xdst->u.rt.fl.fl4_src == fl->fl4_src && |