netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net-next-2.6: SYN retransmits: Rename threshold variable
@ 2010-09-28 19:45 Damian Lukowski
  2010-10-01  0:23 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Damian Lukowski @ 2010-09-28 19:45 UTC (permalink / raw)
  To: netdev


This preparatory patch renames the threshold variable in
retransmits_timed_out() for proper code style.

Signed-off-by: Damian Lukowski <damian@tvk.rwth-aachen.de>
---
 net/ipv4/tcp_timer.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index baea4a1..98cbc60 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -141,7 +141,7 @@ static bool retransmits_timed_out(struct sock *sk,
 				  unsigned int boundary,
 				  unsigned int timeout)
 {
-	unsigned int linear_backoff_thresh, start_ts;
+	unsigned int backoff_thresh, start_ts;
 
 	if (!inet_csk(sk)->icsk_retransmits)
 		return false;
@@ -152,13 +152,13 @@ static bool retransmits_timed_out(struct sock *sk,
 		start_ts = tcp_sk(sk)->retrans_stamp;
 
 	if (likely(timeout == 0)) {
-		linear_backoff_thresh = ilog2(TCP_RTO_MAX/TCP_RTO_MIN);
+		backoff_thresh = ilog2(TCP_RTO_MAX/TCP_RTO_MIN);
 
-		if (boundary <= linear_backoff_thresh)
+		if (boundary <= backoff_thresh)
 			timeout = ((2 << boundary) - 1) * TCP_RTO_MIN;
 		else
-			timeout = ((2 << linear_backoff_thresh) - 1) * TCP_RTO_MIN +
-				(boundary - linear_backoff_thresh) * TCP_RTO_MAX;
+			timeout = ((2 << backoff_thresh) - 1) * TCP_RTO_MIN +
+				  (boundary - backoff_thresh) * TCP_RTO_MAX;
 	}
 	return (tcp_time_stamp - start_ts) >= timeout;
 }
-- 
1.7.2.2





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-01  5:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28 19:45 [PATCH 1/2] net-next-2.6: SYN retransmits: Rename threshold variable Damian Lukowski
2010-10-01  0:23 ` David Miller
2010-10-01  5:22   ` Damian Lukowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).