From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH] net: ipv4: netfilter: Remove unused function nf_nat_need_gre() Date: Fri, 7 Apr 2017 01:06:14 +0200 Message-ID: <20170406230614.GA20513@salvia> References: <20170401133633.GA2208@singhal-Inspiron-5558> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jozsef Kadlecsik , "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: simran singhal Return-path: Received: from mail.us.es ([193.147.175.20]:41372 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752775AbdDFXGZ (ORCPT ); Thu, 6 Apr 2017 19:06:25 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 0B72D137B8E for ; Fri, 7 Apr 2017 01:06:21 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id ED39EDA86B for ; Fri, 7 Apr 2017 01:06:20 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id C1B94DA86E for ; Fri, 7 Apr 2017 01:06:18 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20170401133633.GA2208@singhal-Inspiron-5558> Sender: netfilter-devel-owner@vger.kernel.org List-ID: On Sat, Apr 01, 2017 at 07:06:33PM +0530, simran singhal wrote: > The function nf_nat_need_gre() on being called, simply returns > back. The function doesn't have FIXME code around. > Hence, nf_nat_need_gre() and its calls have been removed. > > Signed-off-by: simran singhal > --- > net/ipv4/netfilter/nf_nat_pptp.c | 2 -- > net/ipv4/netfilter/nf_nat_proto_gre.c | 6 ------ > 2 files changed, 8 deletions(-) > > diff --git a/net/ipv4/netfilter/nf_nat_pptp.c b/net/ipv4/netfilter/nf_nat_pptp.c > index b3ca21b..747e737 100644 > --- a/net/ipv4/netfilter/nf_nat_pptp.c > +++ b/net/ipv4/netfilter/nf_nat_pptp.c > @@ -282,8 +282,6 @@ pptp_inbound_pkt(struct sk_buff *skb, > > static int __init nf_nat_helper_pptp_init(void) > { > - nf_nat_need_gre(); > - > BUG_ON(nf_nat_pptp_hook_outbound != NULL); > RCU_INIT_POINTER(nf_nat_pptp_hook_outbound, pptp_outbound_pkt); > > diff --git a/net/ipv4/netfilter/nf_nat_proto_gre.c b/net/ipv4/netfilter/nf_nat_proto_gre.c > index edf0500..c020a4d 100644 > --- a/net/ipv4/netfilter/nf_nat_proto_gre.c > +++ b/net/ipv4/netfilter/nf_nat_proto_gre.c > @@ -142,9 +142,3 @@ static void __exit nf_nat_proto_gre_fini(void) > > module_init(nf_nat_proto_gre_init); > module_exit(nf_nat_proto_gre_fini); > - > -void nf_nat_need_gre(void) > -{ > - return; > -} > -EXPORT_SYMBOL_GPL(nf_nat_need_gre); There is a good reason why we have this :) By digging out and doing a bit of software archeology work via the 'git annotate' you know this triggers an explicit module dependency.