Skip to content

Commit a12a601

Browse files
Li RongQingdavem330
authored andcommitted
tcp: Change tcp_slow_start function to return void
No caller uses the return value, so make this function return void. Signed-off-by: Li RongQing <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3243acd commit a12a601

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

include/net/tcp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ void tcp_get_available_congestion_control(char *buf, size_t len);
830830
void tcp_get_allowed_congestion_control(char *buf, size_t len);
831831
int tcp_set_allowed_congestion_control(char *allowed);
832832
int tcp_set_congestion_control(struct sock *sk, const char *name);
833-
int tcp_slow_start(struct tcp_sock *tp, u32 acked);
833+
void tcp_slow_start(struct tcp_sock *tp, u32 acked);
834834
void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w);
835835

836836
u32 tcp_reno_ssthresh(struct sock *sk);

net/ipv4/tcp_cong.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,13 @@ int tcp_set_congestion_control(struct sock *sk, const char *name)
291291
* ABC caps N to 2. Slow start exits when cwnd grows over ssthresh and
292292
* returns the leftover acks to adjust cwnd in congestion avoidance mode.
293293
*/
294-
int tcp_slow_start(struct tcp_sock *tp, u32 acked)
294+
void tcp_slow_start(struct tcp_sock *tp, u32 acked)
295295
{
296296
u32 cwnd = tp->snd_cwnd + acked;
297297

298298
if (cwnd > tp->snd_ssthresh)
299299
cwnd = tp->snd_ssthresh + 1;
300-
acked -= cwnd - tp->snd_cwnd;
301300
tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp);
302-
return acked;
303301
}
304302
EXPORT_SYMBOL_GPL(tcp_slow_start);
305303

0 commit comments

Comments
 (0)