* [PATCH net-next] arp: Remove #ifdef CONFIG_PROC_FS
@ 2021-11-22 7:02 Yajun Deng
2021-11-22 15:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Yajun Deng @ 2021-11-22 7:02 UTC (permalink / raw)
To: davem, yoshfuji, dsahern, kuba; +Cc: netdev, linux-kernel, Yajun Deng
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: Yajun Deng <yajun.deng@linux.dev>
---
net/ipv4/arp.c | 33 ++++++++-------------------------
1 file changed, 8 insertions(+), 25 deletions(-)
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 857a144b1ea9..4db0325f6e1a 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1299,21 +1299,6 @@ static struct packet_type arp_packet_type __read_mostly = {
.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)
/* ------------------------------------------------------------------------ */
@@ -1451,16 +1436,14 @@ static struct pernet_operations arp_net_ops = {
.exit = arp_net_exit,
};
-static int __init arp_proc_init(void)
+void __init arp_init(void)
{
- return register_pernet_subsys(&arp_net_ops);
-}
-
-#else /* CONFIG_PROC_FS */
+ neigh_table_init(NEIGH_ARP_TABLE, &arp_tbl);
-static int __init arp_proc_init(void)
-{
- return 0;
+ dev_add_pack(&arp_packet_type);
+ register_pernet_subsys(&arp_net_ops);
+#ifdef CONFIG_SYSCTL
+ neigh_sysctl_register(NULL, &arp_tbl.parms, NULL);
+#endif
+ register_netdevice_notifier(&arp_netdev_notifier);
}
-
-#endif /* CONFIG_PROC_FS */
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] arp: Remove #ifdef CONFIG_PROC_FS
2021-11-22 7:02 [PATCH net-next] arp: Remove #ifdef CONFIG_PROC_FS Yajun Deng
@ 2021-11-22 15:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-22 15:00 UTC (permalink / raw)
To: Yajun Deng; +Cc: davem, yoshfuji, dsahern, kuba, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Mon, 22 Nov 2021 15:02:36 +0800 you wrote:
> 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: Yajun Deng <yajun.deng@linux.dev>
> ---
> net/ipv4/arp.c | 33 ++++++++-------------------------
> 1 file changed, 8 insertions(+), 25 deletions(-)
Here is the summary with links:
- [net-next] arp: Remove #ifdef CONFIG_PROC_FS
https://git.kernel.org/netdev/net-next/c/e968b1b3e9b8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-22 15:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 7:02 [PATCH net-next] arp: Remove #ifdef CONFIG_PROC_FS Yajun Deng
2021-11-22 15:00 ` patchwork-bot+netdevbpf
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).