]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
tcp: Change tcp_slow_start function to return void
authorLi RongQing <roy.qing.li@gmail.com>
Tue, 30 Sep 2014 01:49:55 +0000 (09:49 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Sep 2014 21:09:16 +0000 (17:09 -0400)
No caller uses the return value, so make this function return void.

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/tcp_cong.c

index 545a79aa42125a36b461dd1919809c8d9ead8906..ba2f9d03076bb94b069c380ba5abf6974a8533fb 100644 (file)
@@ -830,7 +830,7 @@ void tcp_get_available_congestion_control(char *buf, size_t len);
 void tcp_get_allowed_congestion_control(char *buf, size_t len);
 int tcp_set_allowed_congestion_control(char *allowed);
 int tcp_set_congestion_control(struct sock *sk, const char *name);
-int tcp_slow_start(struct tcp_sock *tp, u32 acked);
+void tcp_slow_start(struct tcp_sock *tp, u32 acked);
 void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w);
 
 u32 tcp_reno_ssthresh(struct sock *sk);
index a6c8a5775624ca844a9bb819c5a329dc1da22be4..b1c5970d47a1bf65a9c9cbf6a89d13b0bb8f909f 100644 (file)
@@ -291,15 +291,13 @@ int tcp_set_congestion_control(struct sock *sk, const char *name)
  * ABC caps N to 2. Slow start exits when cwnd grows over ssthresh and
  * returns the leftover acks to adjust cwnd in congestion avoidance mode.
  */
-int tcp_slow_start(struct tcp_sock *tp, u32 acked)
+void tcp_slow_start(struct tcp_sock *tp, u32 acked)
 {
        u32 cwnd = tp->snd_cwnd + acked;
 
        if (cwnd > tp->snd_ssthresh)
                cwnd = tp->snd_ssthresh + 1;
-       acked -= cwnd - tp->snd_cwnd;
        tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp);
-       return acked;
 }
 EXPORT_SYMBOL_GPL(tcp_slow_start);