From: Simon Horman <horms@verge.net.au>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: wensong@linux-vs.org, ja@ssi.bg, pablo@netfilter.org,
kaber@trash.net, yongjun_wei@trendmicro.com.cn,
lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org,
netfilter@vger.kernel.org
Subject: Re: [PATCH] ipvs: use list_del_init instead of list_del/INIT_LIST_HEAD
Date: Mon, 10 Sep 2012 09:01:30 +0900 [thread overview]
Message-ID: <20120910000129.GA31408@verge.net.au> (raw)
In-Reply-To: <CAPgLHd_JMzWm-Eh48bXcq6xW2viVEQgmkxLU8KgVyD2gUk6sZQ@mail.gmail.com>
On Thu, Sep 06, 2012 at 12:21:53PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Using list_del_init() instead of list_del() + INIT_LIST_HEAD().
>
> spatch with a semantic match is used to found this problem.
> (http://coccinelle.lip6.fr/)
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Simon Horman <horms@verge.net.au>
> ---
> net/netfilter/ipvs/ip_vs_ctl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
> index f51013c..9d9f83e 100644
> --- a/net/netfilter/ipvs/ip_vs_ctl.c
> +++ b/net/netfilter/ipvs/ip_vs_ctl.c
> @@ -539,8 +539,7 @@ static int ip_vs_rs_unhash(struct ip_vs_dest *dest)
> * Remove it from the rs_table table.
> */
> if (!list_empty(&dest->d_list)) {
> - list_del(&dest->d_list);
> - INIT_LIST_HEAD(&dest->d_list);
> + list_del_init(&dest->d_list);
> }
>
> return 1;
>
>
next prev parent reply other threads:[~2012-09-10 0:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-06 4:21 [PATCH] ipvs: use list_del_init instead of list_del/INIT_LIST_HEAD Wei Yongjun
2012-09-10 0:01 ` Simon Horman [this message]
2012-09-10 9:16 ` Pablo Neira Ayuso
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=20120910000129.GA31408@verge.net.au \
--to=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=kaber@trash.net \
--cc=lvs-devel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=netfilter@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=weiyj.lk@gmail.com \
--cc=wensong@linux-vs.org \
--cc=yongjun_wei@trendmicro.com.cn \
/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).