diff mbox

ipvs: Remove unused net variable from ip_vs_out

Message ID 1443746619-3503-1-git-send-email-horms@verge.net.au
State Changes Requested
Delegated to: Pablo Neira
Headers show

Commit Message

Simon Horman Oct. 2, 2015, 12:43 a.m. UTC
Since 6f2bcea9917d ("ipvs: Pass ipvs into ip_vs_in_icmp and ip_vs_in_icmp_v6")
the net net variable in ip_vs_out() appears to be unused so remove it.

Signed-off-by: Simon Horman <horms@verge.net.au>
---
 net/netfilter/ipvs/ip_vs_core.c | 1 -
 1 file changed, 1 deletion(-)

Comments

kernel test robot Oct. 2, 2015, 12:53 a.m. UTC | #1
Hi Simon,

[auto build test results on next-20151001 -- if it's inappropriate base, please ignore]

config: i386-randconfig-i1-201539 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_out':
>> net/netfilter/ipvs/ip_vs_core.c:1276:18: error: 'net' undeclared (first use in this function)
          skb->dev = net->loopback_dev;
                     ^
   net/netfilter/ipvs/ip_vs_core.c:1276:18: note: each undeclared identifier is reported only once for each function it appears in

vim +/net +1276 net/netfilter/ipvs/ip_vs_core.c

2906f66a net/netfilter/ipvs/ip_vs_core.c Venkata Mohan Reddy 2010-02-18  1270  				 || (iph.protocol == IPPROTO_SCTP
2906f66a net/netfilter/ipvs/ip_vs_core.c Venkata Mohan Reddy 2010-02-18  1271  					&& !is_sctp_abort(skb,
2906f66a net/netfilter/ipvs/ip_vs_core.c Venkata Mohan Reddy 2010-02-18  1272  						iph.len)))) {
2a3b791e net/ipv4/ipvs/ip_vs_core.c      Julius Volz         2008-09-02  1273  #ifdef CONFIG_IP_VS_IPV6
cb59155f net/netfilter/ipvs/ip_vs_core.c Julian Anastasov    2010-10-17  1274  				if (af == AF_INET6) {
cb59155f net/netfilter/ipvs/ip_vs_core.c Julian Anastasov    2010-10-17  1275  					if (!skb->dev)
cb59155f net/netfilter/ipvs/ip_vs_core.c Julian Anastasov    2010-10-17 @1276  						skb->dev = net->loopback_dev;
2a3b791e net/ipv4/ipvs/ip_vs_core.c      Julius Volz         2008-09-02  1277  					icmpv6_send(skb,
2a3b791e net/ipv4/ipvs/ip_vs_core.c      Julius Volz         2008-09-02  1278  						    ICMPV6_DEST_UNREACH,
2a3b791e net/ipv4/ipvs/ip_vs_core.c      Julius Volz         2008-09-02  1279  						    ICMPV6_PORT_UNREACH,

:::::: The code at line 1276 was first introduced by commit
:::::: cb59155f21d4c0507d2034c2953f6a3f7806913d ipvs: changes for local client

:::::: TO: Julian Anastasov <ja@ssi.bg>
:::::: CC: Simon Horman <horms@verge.net.au>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Julian Anastasov Oct. 6, 2015, 6:35 a.m. UTC | #2
Hello,

On Fri, 2 Oct 2015, Simon Horman wrote:

> Since 6f2bcea9917d ("ipvs: Pass ipvs into ip_vs_in_icmp and ip_vs_in_icmp_v6")
> the net net variable in ip_vs_out() appears to be unused so remove it.
> 
> Signed-off-by: Simon Horman <horms@verge.net.au>
> ---
>  net/netfilter/ipvs/ip_vs_core.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> index d08df435c2aa..72b6a44ea9de 100644
> --- a/net/netfilter/ipvs/ip_vs_core.c
> +++ b/net/netfilter/ipvs/ip_vs_core.c
> @@ -1172,7 +1172,6 @@ drop:
>  static unsigned int
>  ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, int af)
>  {
> -	struct net *net = ipvs->net;

	So, this line should be moved into the block
where the var is used?

Regards

--
Julian Anastasov <ja@ssi.bg>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman Oct. 6, 2015, 7:33 a.m. UTC | #3
On Tue, Oct 06, 2015 at 09:35:29AM +0300, Julian Anastasov wrote:
> 
> 	Hello,
> 
> On Fri, 2 Oct 2015, Simon Horman wrote:
> 
> > Since 6f2bcea9917d ("ipvs: Pass ipvs into ip_vs_in_icmp and ip_vs_in_icmp_v6")
> > the net net variable in ip_vs_out() appears to be unused so remove it.
> > 
> > Signed-off-by: Simon Horman <horms@verge.net.au>
> > ---
> >  net/netfilter/ipvs/ip_vs_core.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> > index d08df435c2aa..72b6a44ea9de 100644
> > --- a/net/netfilter/ipvs/ip_vs_core.c
> > +++ b/net/netfilter/ipvs/ip_vs_core.c
> > @@ -1172,7 +1172,6 @@ drop:
> >  static unsigned int
> >  ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, int af)
> >  {
> > -	struct net *net = ipvs->net;
> 
> 	So, this line should be moved into the block
> where the var is used?

Indeed, I'll send an updated patch.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index d08df435c2aa..72b6a44ea9de 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1172,7 +1172,6 @@  drop:
 static unsigned int
 ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, int af)
 {
-	struct net *net = ipvs->net;
 	struct ip_vs_iphdr iph;
 	struct ip_vs_protocol *pp;
 	struct ip_vs_proto_data *pd;