netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org,
	Wensong Zhang <wensong@linux-vs.org>,
	Julian Anastasov <ja@ssi.bg>,
	Arushi Singhal <arushisinghal19971997@gmail.com>,
	Simon Horman <horms@verge.net.au>
Subject: [PATCH 3/3] ipvs: remove unused variable
Date: Mon, 10 Apr 2017 09:58:35 -0700	[thread overview]
Message-ID: <1491843515-1627-4-git-send-email-horms@verge.net.au> (raw)
In-Reply-To: <1491843515-1627-1-git-send-email-horms@verge.net.au>

From: Arushi Singhal <arushisinghal19971997@gmail.com>

This patch uses the following coccinelle script to remove
a variable that was simply used to store the return
value of a function call before returning it:

@@
identifier len,f;
@@

-int len;
 ... when != len
     when strict
-len =
+return
        f(...);
-return len;

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 net/netfilter/ipvs/ip_vs_ftp.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
index 2e2bf7428cd1..6caf4459e981 100644
--- a/net/netfilter/ipvs/ip_vs_ftp.c
+++ b/net/netfilter/ipvs/ip_vs_ftp.c
@@ -482,11 +482,8 @@ static struct pernet_operations ip_vs_ftp_ops = {
 
 static int __init ip_vs_ftp_init(void)
 {
-	int rv;
-
-	rv = register_pernet_subsys(&ip_vs_ftp_ops);
 	/* rcu_barrier() is called by netns on error */
-	return rv;
+	return register_pernet_subsys(&ip_vs_ftp_ops);
 }
 
 /*
-- 
2.7.0.rc3.207.g0ac5344

  parent reply	other threads:[~2017-04-10 16:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10 16:58 [GIT 0/3] Second Round of IPVS Updates for v4.12 Simon Horman
2017-04-10 16:58 ` [PATCH 1/3] netfilter: ipvs: don't check for presence of nat extension Simon Horman
2017-04-10 16:58 ` [PATCH 2/3] netfilter: ipvs: Replace kzalloc with kcalloc Simon Horman
2017-04-10 16:58 ` Simon Horman [this message]
2017-04-13 23:01 ` [GIT 0/3] Second Round of IPVS Updates for v4.12 Pablo Neira Ayuso
2017-04-13 23:51   ` Simon Horman
2017-04-14  0:06     ` Pablo Neira Ayuso
2017-04-15  8:59       ` 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=1491843515-1627-4-git-send-email-horms@verge.net.au \
    --to=horms@verge.net.au \
    --cc=arushisinghal19971997@gmail.com \
    --cc=ja@ssi.bg \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=wensong@linux-vs.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).