netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipvs: Remove unused net variable from ip_vs_out
@ 2015-10-02  0:43 Simon Horman
  2015-10-02  0:53 ` kbuild test robot
  2015-10-06  6:35 ` Julian Anastasov
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Horman @ 2015-10-02  0:43 UTC (permalink / raw)
  To: lvs-devel
  Cc: netdev, netfilter-devel, Wensong Zhang, Julian Anastasov,
	Eric W. Biederman, Simon Horman

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;
 	struct ip_vs_iphdr iph;
 	struct ip_vs_protocol *pp;
 	struct ip_vs_proto_data *pd;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ipvs: Remove unused net variable from ip_vs_out
  2015-10-02  0:43 [PATCH] ipvs: Remove unused net variable from ip_vs_out Simon Horman
@ 2015-10-02  0:53 ` kbuild test robot
  2015-10-06  6:35 ` Julian Anastasov
  1 sibling, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2015-10-02  0:53 UTC (permalink / raw)
  To: Simon Horman
  Cc: kbuild-all, lvs-devel, netdev, netfilter-devel, Wensong Zhang,
	Julian Anastasov, Eric W. Biederman, Simon Horman

[-- Attachment #1: Type: text/plain, Size: 2151 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 27196 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ipvs: Remove unused net variable from ip_vs_out
  2015-10-02  0:43 [PATCH] ipvs: Remove unused net variable from ip_vs_out Simon Horman
  2015-10-02  0:53 ` kbuild test robot
@ 2015-10-06  6:35 ` Julian Anastasov
  2015-10-06  7:33   ` Simon Horman
  1 sibling, 1 reply; 4+ messages in thread
From: Julian Anastasov @ 2015-10-06  6:35 UTC (permalink / raw)
  To: Simon Horman
  Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
	Eric W. Biederman


	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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ipvs: Remove unused net variable from ip_vs_out
  2015-10-06  6:35 ` Julian Anastasov
@ 2015-10-06  7:33   ` Simon Horman
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2015-10-06  7:33 UTC (permalink / raw)
  To: Julian Anastasov
  Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
	Eric W. Biederman

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-06  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02  0:43 [PATCH] ipvs: Remove unused net variable from ip_vs_out Simon Horman
2015-10-02  0:53 ` kbuild test robot
2015-10-06  6:35 ` Julian Anastasov
2015-10-06  7:33   ` Simon Horman

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).