All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] ipvlan: fix sparse warnings
@ 2014-11-26  5:24 Mahesh Bandewar
  2014-11-26 20:13 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Mahesh Bandewar @ 2014-11-26  5:24 UTC (permalink / raw
  To: netdev; +Cc: David Miller, Mahesh Bandewar

Fix sparse warnings reported by kbuild robot

drivers/net/ipvlan/ipvlan_main.c:172:13: warning: symbol 'ipvlan_start_xmit' was not declared. Should it be static?
drivers/net/ipvlan/ipvlan_main.c:256:33: warning: incorrect type in initializer (different address spaces)
drivers/net/ipvlan/ipvlan_main.c:256:33:    expected void const [noderef] <asn:3>*__vpp_verify
drivers/net/ipvlan/ipvlan_main.c:256:33:    got struct ipvl_pcpu_stats *<noident>
drivers/net/ipvlan/ipvlan_main.c:544:5: warning: symbol 'ipvlan_link_register' was not declared. Should it be static

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
---
 drivers/net/ipvlan/ipvlan_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index c3df84bd2857..96b71b0d78f6 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -169,7 +169,8 @@ static int ipvlan_stop(struct net_device *dev)
 	return 0;
 }
 
-netdev_tx_t ipvlan_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ipvlan_start_xmit(struct sk_buff *skb,
+				     struct net_device *dev)
 {
 	const struct ipvl_dev *ipvlan = netdev_priv(dev);
 	int skblen = skb->len;
@@ -541,7 +542,7 @@ static struct rtnl_link_ops ipvlan_link_ops = {
 	.dellink	= ipvlan_link_delete,
 };
 
-int ipvlan_link_register(struct rtnl_link_ops *ops)
+static int ipvlan_link_register(struct rtnl_link_ops *ops)
 {
 	return rtnl_link_register(ops);
 }
-- 
2.2.0.rc0.207.ga3a616c

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

* Re: [PATCH net-next] ipvlan: fix sparse warnings
  2014-11-26  5:24 [PATCH net-next] ipvlan: fix sparse warnings Mahesh Bandewar
@ 2014-11-26 20:13 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-11-26 20:13 UTC (permalink / raw
  To: maheshb; +Cc: netdev

From: Mahesh Bandewar <maheshb@google.com>
Date: Tue, 25 Nov 2014 21:24:43 -0800

> Fix sparse warnings reported by kbuild robot
> 
> drivers/net/ipvlan/ipvlan_main.c:172:13: warning: symbol 'ipvlan_start_xmit' was not declared. Should it be static?
> drivers/net/ipvlan/ipvlan_main.c:256:33: warning: incorrect type in initializer (different address spaces)
> drivers/net/ipvlan/ipvlan_main.c:256:33:    expected void const [noderef] <asn:3>*__vpp_verify
> drivers/net/ipvlan/ipvlan_main.c:256:33:    got struct ipvl_pcpu_stats *<noident>
> drivers/net/ipvlan/ipvlan_main.c:544:5: warning: symbol 'ipvlan_link_register' was not declared. Should it be static
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>

Applied, can you please fix the build failures that have been
reported?  Those are more important.  Namely:

====================
Building with the attached random configuration file,

In file included from drivers/net/ipvlan/ipvlan.h:27:0,
                 from drivers/net/ipvlan/ipvlan_core.c:10:
include/net/gre.h: In function ‘gre_handle_offloads’:
include/net/gre.h:42:2: error: implicit declaration of function
‘iptunnel_handle_offloads’ [-Werror=implicit-function-declaration]
  return iptunnel_handle_offloads(skb, csum,
  ^
include/net/gre.h:42:2: warning: return makes pointer from integer
without a cast [enabled by default]
drivers/net/ipvlan/ipvlan_core.c: In function ‘ipvlan_process_v6_outbound’:
drivers/net/ipvlan/ipvlan_core.c:379:2: error: implicit declaration of function
‘ip6_route_output’ [-Werror=implicit-function-declaration]
  dst = ip6_route_output(dev_net(dev), NULL, &fl6);
  ^
drivers/net/ipvlan/ipvlan_core.c:379:6: warning: assignment makes
pointer from integer without a cast [enabled by default]
  dst = ip6_route_output(dev_net(dev), NULL, &fl6);
      ^
  CC [M]  drivers/mtd/mtdblock_ro.o
cc1: some warnings being treated as errors
make[3]: *** [drivers/net/ipvlan/ipvlan_core.o] Error 1
====================

You probably need to add a bunch of missing dependencies to
the Kconfig entry for the ipvlan driver.

For one thing it definitely needs "INET" and that explains
the lack of iptunnel_handle_offloads() when including net/gre.h

Likewise for the ipv6 stuff.

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

end of thread, other threads:[~2014-11-26 20:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-26  5:24 [PATCH net-next] ipvlan: fix sparse warnings Mahesh Bandewar
2014-11-26 20:13 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.