* [PATCH net-next] arp: fix unused variable warnning when CONFIG_PROC_FS=n
@ 2022-04-22 6:14 Yajun Deng
2022-04-25 11:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Yajun Deng @ 2022-04-22 6:14 UTC (permalink / raw)
To: davem, yoshfuji, dsahern, kuba, pabeni
Cc: netdev, linux-kernel, Yajun Deng, kernel test robot
net/ipv4/arp.c:1412:36: warning: unused variable 'arp_seq_ops' [-Wunused-const-variable]
Add #ifdef CONFIG_PROC_FS for 'arp_seq_ops'.
Fixes: e968b1b3e9b8 ("arp: Remove #ifdef CONFIG_PROC_FS")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
---
net/ipv4/arp.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 2d0c05ca9c6f..ab4a5601c82a 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1304,9 +1304,9 @@ static struct packet_type arp_packet_type __read_mostly = {
.func = arp_rcv,
};
+#ifdef CONFIG_PROC_FS
#if IS_ENABLED(CONFIG_AX25)
-/* ------------------------------------------------------------------------ */
/*
* ax25 -> ASCII conversion
*/
@@ -1412,16 +1412,13 @@ static void *arp_seq_start(struct seq_file *seq, loff_t *pos)
return neigh_seq_start(seq, pos, &arp_tbl, NEIGH_SEQ_SKIP_NOARP);
}
-/* ------------------------------------------------------------------------ */
-
static const struct seq_operations arp_seq_ops = {
.start = arp_seq_start,
.next = neigh_seq_next,
.stop = neigh_seq_stop,
.show = arp_seq_show,
};
-
-/* ------------------------------------------------------------------------ */
+#endif /* CONFIG_PROC_FS */
static int __net_init arp_net_init(struct net *net)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net-next] arp: fix unused variable warnning when CONFIG_PROC_FS=n
2022-04-22 6:14 [PATCH net-next] arp: fix unused variable warnning when CONFIG_PROC_FS=n Yajun Deng
@ 2022-04-25 11:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-25 11:00 UTC (permalink / raw)
To: Yajun Deng
Cc: davem, yoshfuji, dsahern, kuba, pabeni, netdev, linux-kernel, lkp
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Fri, 22 Apr 2022 14:14:31 +0800 you wrote:
> net/ipv4/arp.c:1412:36: warning: unused variable 'arp_seq_ops' [-Wunused-const-variable]
>
> Add #ifdef CONFIG_PROC_FS for 'arp_seq_ops'.
>
> Fixes: e968b1b3e9b8 ("arp: Remove #ifdef CONFIG_PROC_FS")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
>
> [...]
Here is the summary with links:
- [net-next] arp: fix unused variable warnning when CONFIG_PROC_FS=n
https://git.kernel.org/netdev/net-next/c/b0e653b2a0d9
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:[~2022-04-25 11:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-22 6:14 [PATCH net-next] arp: fix unused variable warnning when CONFIG_PROC_FS=n Yajun Deng
2022-04-25 11: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