From: Dan Carpenter <error27@gmail.com>
To: Shan Wei <shanwei@cn.fujitsu.com>
Cc: Vlad Yasevich <vladislav.yasevich@hp.com>,
Sridhar Samudrala <sri@us.ibm.com>,
"David S. Miller" <davem@davemloft.net>,
Wei Yongjun <yjwei@cn.fujitsu.com>,
Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>,
linux-sctp@vger.kernel.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] sctp: fix test for end of loop
Date: Tue, 07 Sep 2010 11:31:15 +0000 [thread overview]
Message-ID: <20100907113115.GB5718@bicker> (raw)
In-Reply-To: <4C85FC02.3040804@cn.fujitsu.com>
On Tue, Sep 07, 2010 at 04:46:58PM +0800, Shan Wei wrote:
> Dan Carpenter wrote, at 09/06/2010 08:26 PM:
> > + &new_addr->transports != &new_asoc->peer.transport_addr_list) {
>
> why did you add this check?
>
That's the check which tells us if we broke out of the loop or if we
came to the end of the list.
As I explained before, the only way that the check matters is if the
list is empty. With the current code I do not think we ever call this
function with an empty list, so that check is not needed. But the code
could change I suppose and it doesn't hurt to be cautious. On the other
hand, I'm fine with removing the check as well.
regards,
dan carpenter
>
> --
> Best Regards
> -----
> Shan Wei
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Shan Wei <shanwei@cn.fujitsu.com>
Cc: Vlad Yasevich <vladislav.yasevich@hp.com>,
Sridhar Samudrala <sri@us.ibm.com>,
"David S. Miller" <davem@davemloft.net>,
Wei Yongjun <yjwei@cn.fujitsu.com>,
Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>,
linux-sctp@vger.kernel.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] sctp: fix test for end of loop
Date: Tue, 7 Sep 2010 13:31:15 +0200 [thread overview]
Message-ID: <20100907113115.GB5718@bicker> (raw)
In-Reply-To: <4C85FC02.3040804@cn.fujitsu.com>
On Tue, Sep 07, 2010 at 04:46:58PM +0800, Shan Wei wrote:
> Dan Carpenter wrote, at 09/06/2010 08:26 PM:
> > + &new_addr->transports != &new_asoc->peer.transport_addr_list) {
>
> why did you add this check?
>
That's the check which tells us if we broke out of the loop or if we
came to the end of the list.
As I explained before, the only way that the check matters is if the
list is empty. With the current code I do not think we ever call this
function with an empty list, so that check is not needed. But the code
could change I suppose and it doesn't hurt to be cautious. On the other
hand, I'm fine with removing the check as well.
regards,
dan carpenter
>
> --
> Best Regards
> -----
> Shan Wei
next prev parent reply other threads:[~2010-09-07 11:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 12:26 [patch] sctp: fix test for end of loop Dan Carpenter
2010-09-06 12:26 ` Dan Carpenter
2010-09-07 8:46 ` Shan Wei
2010-09-07 8:46 ` Shan Wei
2010-09-07 11:31 ` Dan Carpenter [this message]
2010-09-07 11:31 ` Dan Carpenter
2010-09-08 20:24 ` David Miller
2010-09-08 20:24 ` David Miller
2010-09-08 20:34 ` Vlad Yasevich
2010-09-08 20:34 ` Vlad Yasevich
2010-09-08 20:37 ` David Miller
2010-09-08 20:37 ` David Miller
2010-09-08 21:04 ` [Alternative PATCH net-next] " Joe Perches
2010-09-08 21:04 ` Joe Perches
2010-09-09 13:57 ` Vlad Yasevich
2010-09-09 13:57 ` Vlad Yasevich
2010-09-09 22:00 ` David Miller
2010-09-09 22:00 ` David Miller
2010-09-08 20:26 ` [patch] " Vlad Yasevich
2010-09-08 20:26 ` Vlad Yasevich
2010-09-08 20:30 ` David Miller
2010-09-08 20:30 ` David Miller
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=20100907113115.GB5718@bicker \
--to=error27@gmail.com \
--cc=cascardo@holoscopio.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shanwei@cn.fujitsu.com \
--cc=sri@us.ibm.com \
--cc=vladislav.yasevich@hp.com \
--cc=yjwei@cn.fujitsu.com \
/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 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.