]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tcp: tcp_init_wl / tcp_update_wl argument cleanup
authorHantzis Fotis <xantzis@ceid.upatras.gr>
Tue, 3 Mar 2009 06:42:02 +0000 (22:42 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Mar 2009 06:42:02 +0000 (22:42 -0800)
The above functions from include/net/tcp.h have been defined with an
argument that they never use. The argument is 'u32 ack' which is never
used inside the function body, and thus it can be removed. The rest of
the patch involves the necessary changes to the function callers of the
above two functions.

Signed-off-by: Hantzis Fotis <xantzis@ceid.upatras.gr>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/tcp_input.c
net/ipv4/tcp_minisocks.c
net/ipv4/tcp_output.c

index 055e4946d4c8ade886cad3679cac8dc52b9f5b63..d74ac301e6bc10835b604e0963ff56cfa2f407a2 100644 (file)
@@ -825,12 +825,12 @@ static inline void tcp_push_pending_frames(struct sock *sk)
        __tcp_push_pending_frames(sk, tcp_current_mss(sk, 1), tp->nonagle);
 }
 
-static inline void tcp_init_wl(struct tcp_sock *tp, u32 ack, u32 seq)
+static inline void tcp_init_wl(struct tcp_sock *tp, u32 seq)
 {
        tp->snd_wl1 = seq;
 }
 
-static inline void tcp_update_wl(struct tcp_sock *tp, u32 ack, u32 seq)
+static inline void tcp_update_wl(struct tcp_sock *tp, u32 seq)
 {
        tp->snd_wl1 = seq;
 }
index e4442a293eb074fa302b6887be92859846c59975..5ecd7aa2597960dba7483188b026e7e848501aaf 100644 (file)
@@ -3416,7 +3416,7 @@ static int tcp_ack_update_window(struct sock *sk, struct sk_buff *skb, u32 ack,
 
        if (tcp_may_update_window(tp, ack, ack_seq, nwin)) {
                flag |= FLAG_WIN_UPDATE;
-               tcp_update_wl(tp, ack, ack_seq);
+               tcp_update_wl(tp, ack_seq);
 
                if (tp->snd_wnd != nwin) {
                        tp->snd_wnd = nwin;
@@ -3621,7 +3621,7 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
                 * No more checks are required.
                 * Note, we use the fact that SND.UNA>=SND.WL2.
                 */
-               tcp_update_wl(tp, ack, ack_seq);
+               tcp_update_wl(tp, ack_seq);
                tp->snd_una = ack;
                flag |= FLAG_WIN_UPDATE;
 
@@ -5418,7 +5418,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
                 * never scaled.
                 */
                tp->snd_wnd = ntohs(th->window);
-               tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq, TCP_SKB_CB(skb)->seq);
+               tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
 
                if (!tp->rx_opt.wscale_ok) {
                        tp->rx_opt.snd_wscale = tp->rx_opt.rcv_wscale = 0;
@@ -5679,8 +5679,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
                                tp->snd_una = TCP_SKB_CB(skb)->ack_seq;
                                tp->snd_wnd = ntohs(th->window) <<
                                              tp->rx_opt.snd_wscale;
-                               tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq,
-                                           TCP_SKB_CB(skb)->seq);
+                               tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
 
                                /* tcp_ack considers this ACK as duplicate
                                 * and does not calculate rtt.
index bb3d8b35f19a0f21a6e17262a852861ac3a11549..4b0df3e6b609b9c5d9679441d5618986cbc7fd20 100644 (file)
@@ -399,7 +399,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req,
 
                tcp_prequeue_init(newtp);
 
-               tcp_init_wl(newtp, treq->snt_isn, treq->rcv_isn);
+               tcp_init_wl(newtp, treq->rcv_isn);
 
                newtp->srtt = 0;
                newtp->mdev = TCP_TIMEOUT_INIT;
index 920c57b90ded41d708caaf73b4e182ff23b965a3..eb285befdf3bf11e979d9abaa1de85f9c78a5ba7 100644 (file)
@@ -2337,7 +2337,7 @@ static void tcp_connect_init(struct sock *sk)
        sk->sk_err = 0;
        sock_reset_flag(sk, SOCK_DONE);
        tp->snd_wnd = 0;
-       tcp_init_wl(tp, tp->write_seq, 0);
+       tcp_init_wl(tp, 0);
        tp->snd_una = tp->write_seq;
        tp->snd_sml = tp->write_seq;
        tp->snd_up = tp->write_seq;