From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756048AbdC2OQn (ORCPT ); Wed, 29 Mar 2017 10:16:43 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:6381 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752373AbdC2OQk (ORCPT ); Wed, 29 Mar 2017 10:16:40 -0400 X-IronPort-AV: E=Sophos;i="5.36,241,1486422000"; d="scan'208";a="218491061" Date: Wed, 29 Mar 2017 16:16:35 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Arushi Singhal cc: outreachy-kernel@googlegroups.com, Wensong Zhang , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , netdev@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kernel@vger.kernel.org Subject: Re: [Outreachy kernel] [PATCH] net: netfilter: remove unused variable In-Reply-To: <20170329133848.GA1336@arushi-HP-Pavilion-Notebook> Message-ID: References: <20170329133848.GA1336@arushi-HP-Pavilion-Notebook> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Mar 2017, Arushi Singhal wrote: > 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 > --- > net/netfilter/ipvs/ip_vs_ftp.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c > index d30c327bb578..9e1e682610ef 100644 > --- a/net/netfilter/ipvs/ip_vs_ftp.c > +++ b/net/netfilter/ipvs/ip_vs_ftp.c > @@ -482,11 +482,9 @@ 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); It looks like you end up with an unnecessary blank line at the beginning of the function. julia > } > > /* > -- > 2.11.0 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170329133848.GA1336%40arushi-HP-Pavilion-Notebook. > For more options, visit https://groups.google.com/d/optout. >