aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_cong.c
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2014-08-30 02:32:05 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-01 21:12:45 -0400
commit688d1945bc89bd585ec67b5b83121f499e6290bb (patch)
tree3138045afe46d72e458c1cfb3dd2552b2acaf915 /net/ipv4/tcp_cong.c
parentd09d3038a336cbab6bde616ce44266c36c214f81 (diff)
tcp: whitespace fixes
Fix places where there is space before tab, long lines, and awkward if(){, double spacing etc. Add blank line after declaration/initialization. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_cong.c')
-rw-r--r--net/ipv4/tcp_cong.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 7b09d8b49fa5..80248f56c89f 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -142,7 +142,6 @@ static int __init tcp_congestion_default(void)
142} 142}
143late_initcall(tcp_congestion_default); 143late_initcall(tcp_congestion_default);
144 144
145
146/* Build string with list of available congestion control values */ 145/* Build string with list of available congestion control values */
147void tcp_get_available_congestion_control(char *buf, size_t maxlen) 146void tcp_get_available_congestion_control(char *buf, size_t maxlen)
148{ 147{
@@ -154,7 +153,6 @@ void tcp_get_available_congestion_control(char *buf, size_t maxlen)
154 offs += snprintf(buf + offs, maxlen - offs, 153 offs += snprintf(buf + offs, maxlen - offs,
155 "%s%s", 154 "%s%s",
156 offs == 0 ? "" : " ", ca->name); 155 offs == 0 ? "" : " ", ca->name);
157
158 } 156 }
159 rcu_read_unlock(); 157 rcu_read_unlock();
160} 158}
@@ -186,7 +184,6 @@ void tcp_get_allowed_congestion_control(char *buf, size_t maxlen)
186 offs += snprintf(buf + offs, maxlen - offs, 184 offs += snprintf(buf + offs, maxlen - offs,
187 "%s%s", 185 "%s%s",
188 offs == 0 ? "" : " ", ca->name); 186 offs == 0 ? "" : " ", ca->name);
189
190 } 187 }
191 rcu_read_unlock(); 188 rcu_read_unlock();
192} 189}
@@ -230,7 +227,6 @@ out:
230 return ret; 227 return ret;
231} 228}
232 229
233
234/* Change congestion control for socket */ 230/* Change congestion control for socket */
235int tcp_set_congestion_control(struct sock *sk, const char *name) 231int tcp_set_congestion_control(struct sock *sk, const char *name)
236{ 232{
@@ -337,6 +333,7 @@ EXPORT_SYMBOL_GPL(tcp_reno_cong_avoid);
337u32 tcp_reno_ssthresh(struct sock *sk) 333u32 tcp_reno_ssthresh(struct sock *sk)
338{ 334{
339 const struct tcp_sock *tp = tcp_sk(sk); 335 const struct tcp_sock *tp = tcp_sk(sk);
336
340 return max(tp->snd_cwnd >> 1U, 2U); 337 return max(tp->snd_cwnd >> 1U, 2U);
341} 338}
342EXPORT_SYMBOL_GPL(tcp_reno_ssthresh); 339EXPORT_SYMBOL_GPL(tcp_reno_ssthresh);