netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ying Xue <ying.xue@windriver.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: remove redundant checking for sock timer state
Date: Fri, 1 Feb 2013 14:32:29 +0800	[thread overview]
Message-ID: <510B617D.1050004@windriver.com> (raw)
In-Reply-To: <20130201.010946.584437309593473452.davem@davemloft.net>

David Miller wrote:
> From: Ying Xue <ying.xue@windriver.com>
> Date: Fri, 1 Feb 2013 13:53:00 +0800
> 
>> It's unnecessary to check whether the sock timer to be stopped is
>> pending or not in sk_stop_timer() as del_timer() will do the same
>> thing later.
>>
>> Signed-off-by: Ying Xue <ying.xue@windriver.com>
> 
> Did it even occur to you that when this code was written, this
> "redundant" testing was also redundant, but that it might have been
> done on purpose?
> 

Sorry, at least I really cannot figure out the redundant test has some 
special purpose. However, it seems I found some clues which may prove 
the "redundant" test is really redundant:

The sk_stop_timer() function is never changed after kernel initial git 
repository is built. But calling timer_pending() in del_timer() is 
involved by 55c888d6 commit.


Regards,
Ying


> If you are going to change this code, you must understand why it was
> written this way, because that is the only context in which you will
> be able to justify removing the test.
> 
> Otherwise I'm ignoring this patch.
> 

Hi Dave,

      parent reply	other threads:[~2013-02-01  6:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01  5:53 [PATCH] net: remove redundant checking for sock timer state Ying Xue
2013-02-01  6:09 ` David Miller
2013-02-01  6:26   ` Eric Dumazet
2013-02-01  7:14     ` Xue Ying
2013-02-01  7:21       ` Eric Dumazet
2013-02-01  7:25         ` Ying Xue
2013-02-01  9:26         ` David Laight
2013-02-01 15:22           ` Eric Dumazet
2013-02-01  6:32   ` Ying Xue [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=510B617D.1050004@windriver.com \
    --to=ying.xue@windriver.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).