All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next PATCH] tcp: remove useless assignment statement in tcp_keepalive_timer
@ 2011-08-22 10:03 Li Yu
  2011-08-22 10:46 ` Christoph Paasch
  0 siblings, 1 reply; 3+ messages in thread
From: Li Yu @ 2011-08-22 10:03 UTC (permalink / raw)
  To: netdev


Remove useless assignment statement, it may be trash after refactoring?

Signed-off-by: Li Yu <raise.sail@gmail.com>
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index ecd44b0..321ff2f 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -552,8 +552,6 @@ static void tcp_keepalive_timer (unsigned long data)
 	if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE)
 		goto out;
 
-	elapsed = keepalive_time_when(tp);
-
 	/* It is alive without keepalive 8) */
 	if (tp->packets_out || tcp_send_head(sk))
 		goto resched;


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

* Re: [net-next PATCH] tcp: remove useless assignment statement in tcp_keepalive_timer
  2011-08-22 10:03 [net-next PATCH] tcp: remove useless assignment statement in tcp_keepalive_timer Li Yu
@ 2011-08-22 10:46 ` Christoph Paasch
  2011-08-22 11:01   ` Li Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Paasch @ 2011-08-22 10:46 UTC (permalink / raw)
  To: Li Yu; +Cc: netdev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: Text/Plain; charset=gb18030, Size: 1250 bytes --]

No, if the condition afterwards evaluates to TRUE, and we go to the label 
resched, inet_csk_reset_keepalive_timer(...) is called without elapsed being 
set.

Cheers,
Christoph

On Monday 22 August 2011 wrote Li Yu:
> Remove useless assignment statement, it may be trash after refactoring?
> 
> Signed-off-by: Li Yu <raise.sail@gmail.com>
> diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
> index ecd44b0..321ff2f 100644
> --- a/net/ipv4/tcp_timer.c
> +++ b/net/ipv4/tcp_timer.c
> @@ -552,8 +552,6 @@ static void tcp_keepalive_timer (unsigned long data)
>  	if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE)
>  		goto out;
> 
> -	elapsed = keepalive_time_when(tp);
> -
>  	/* It is alive without keepalive 8) */
>  	if (tp->packets_out || tcp_send_head(sk))
>  		goto resched;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Christoph Paasch
PhD Student

IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Universit¨¦ Catholique de Louvain

www.rollerbulls.be
--

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

* Re: [net-next PATCH] tcp: remove useless assignment statement in tcp_keepalive_timer
  2011-08-22 10:46 ` Christoph Paasch
@ 2011-08-22 11:01   ` Li Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Li Yu @ 2011-08-22 11:01 UTC (permalink / raw)
  To: christoph.paasch; +Cc: netdev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 1399 bytes --]


Oops, thanks for reminding !

Yu

ÓÚ 2011Äê08ÔÂ22ÈÕ 18:46, Christoph Paasch дµÀ:
> No, if the condition afterwards evaluates to TRUE, and we go to the label 
> resched, inet_csk_reset_keepalive_timer(...) is called without elapsed being 
> set.
> 
> Cheers,
> Christoph
> 
> On Monday 22 August 2011 wrote Li Yu:
>> Remove useless assignment statement, it may be trash after refactoring?
>>
>> Signed-off-by: Li Yu <raise.sail@gmail.com>
>> diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
>> index ecd44b0..321ff2f 100644
>> --- a/net/ipv4/tcp_timer.c
>> +++ b/net/ipv4/tcp_timer.c
>> @@ -552,8 +552,6 @@ static void tcp_keepalive_timer (unsigned long data)
>>  	if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE)
>>  		goto out;
>>
>> -	elapsed = keepalive_time_when(tp);
>> -
>>  	/* It is alive without keepalive 8) */
>>  	if (tp->packets_out || tcp_send_head(sk))
>>  		goto resched;
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> --
> Christoph Paasch
> PhD Student
> 
> IP Networking Lab --- http://inl.info.ucl.ac.be
> MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
> Universit¨¦ Catholique de Louvain
> 
> www.rollerbulls.be
> --
> 

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

end of thread, other threads:[~2011-08-22 11:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-22 10:03 [net-next PATCH] tcp: remove useless assignment statement in tcp_keepalive_timer Li Yu
2011-08-22 10:46 ` Christoph Paasch
2011-08-22 11:01   ` Li Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.