Commit e968b1b3 authored by Yajun Deng's avatar Yajun Deng Committed by David S. Miller

arp: Remove #ifdef CONFIG_PROC_FS

proc_create_net() and remove_proc_entry() already contain the case
whether to define CONFIG_PROC_FS, so remove #ifdef CONFIG_PROC_FS.
Signed-off-by: default avatarYajun Deng <yajun.deng@linux.dev>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e9268a94
...@@ -1299,21 +1299,6 @@ static struct packet_type arp_packet_type __read_mostly = { ...@@ -1299,21 +1299,6 @@ static struct packet_type arp_packet_type __read_mostly = {
.func = arp_rcv, .func = arp_rcv,
}; };
static int arp_proc_init(void);
void __init arp_init(void)
{
neigh_table_init(NEIGH_ARP_TABLE, &arp_tbl);
dev_add_pack(&arp_packet_type);
arp_proc_init();
#ifdef CONFIG_SYSCTL
neigh_sysctl_register(NULL, &arp_tbl.parms, NULL);
#endif
register_netdevice_notifier(&arp_netdev_notifier);
}
#ifdef CONFIG_PROC_FS
#if IS_ENABLED(CONFIG_AX25) #if IS_ENABLED(CONFIG_AX25)
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
...@@ -1451,16 +1436,14 @@ static struct pernet_operations arp_net_ops = { ...@@ -1451,16 +1436,14 @@ static struct pernet_operations arp_net_ops = {
.exit = arp_net_exit, .exit = arp_net_exit,
}; };
static int __init arp_proc_init(void) void __init arp_init(void)
{ {
return register_pernet_subsys(&arp_net_ops); neigh_table_init(NEIGH_ARP_TABLE, &arp_tbl);
}
#else /* CONFIG_PROC_FS */
static int __init arp_proc_init(void) dev_add_pack(&arp_packet_type);
{ register_pernet_subsys(&arp_net_ops);
return 0; #ifdef CONFIG_SYSCTL
neigh_sysctl_register(NULL, &arp_tbl.parms, NULL);
#endif
register_netdevice_notifier(&arp_netdev_notifier);
} }
#endif /* CONFIG_PROC_FS */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment