]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
net: fix a build failure when !CONFIG_PROC_FS
authorCong Wang <xiyou.wangcong@gmail.com>
Tue, 19 Feb 2013 02:47:05 +0000 (02:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Feb 2013 18:18:13 +0000 (13:18 -0500)
When !CONFIG_PROC_FS dev_mcast_init() is not defined,
actually we can just merge dev_mcast_init() into
dev_proc_init().

Reported-by: Gao feng <gaofeng@cn.fujitsu.com>
Cc: Gao feng <gaofeng@cn.fujitsu.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c
net/core/net-procfs.c

index f111b4f038f3f17bb587f357b3d235d8d07b8b6a..b3d00fa4b3149b614365dd215a611ed638fdb924 100644 (file)
@@ -2646,7 +2646,6 @@ extern void               netdev_notify_peers(struct net_device *dev);
 extern void            netdev_features_change(struct net_device *dev);
 /* Load a device via the kmod */
 extern void            dev_load(struct net *net, const char *name);
-extern void            dev_mcast_init(void);
 extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
                                               struct rtnl_link_stats64 *storage);
 extern void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64,
index 8d9ddb09f2081076ab6fbbdf2c9c13f4f2e31beb..17bc535115d3db24be70403a00efa6b9b2f056a8 100644 (file)
@@ -6260,7 +6260,6 @@ static int __init net_dev_init(void)
 
        hotcpu_notifier(dev_cpu_callback, 0);
        dst_init();
-       dev_mcast_init();
        rc = 0;
 out:
        return rc;
index ac87066491e94d75f5129c85b1c64e79e1517cbb..0f6bb6f8d391b6fde195303613a5926cc214dba1 100644 (file)
@@ -341,11 +341,6 @@ static struct pernet_operations __net_initdata dev_proc_ops = {
        .exit = dev_proc_net_exit,
 };
 
-int __init dev_proc_init(void)
-{
-       return register_pernet_subsys(&dev_proc_ops);
-}
-
 static int dev_mc_seq_show(struct seq_file *seq, void *v)
 {
        struct netdev_hw_addr *ha;
@@ -408,7 +403,10 @@ static struct pernet_operations __net_initdata dev_mc_net_ops = {
        .exit = dev_mc_net_exit,
 };
 
-void __init dev_mcast_init(void)
+int __init dev_proc_init(void)
 {
-       register_pernet_subsys(&dev_mc_net_ops);
+       int ret = register_pernet_subsys(&dev_proc_ops);
+       if (!ret)
+               return register_pernet_subsys(&dev_mc_net_ops);
+       return ret;
 }