linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] hamradio: bpqether: Fix -Wunused-const-variable warning
@ 2021-06-01 14:00 YueHaibing
  2021-06-02  0:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2021-06-01 14:00 UTC (permalink / raw)
  To: davem, kuba, xiyou.wangcong; +Cc: netdev, linux-kernel, YueHaibing

If CONFIG_PROC_FS is n, gcc warns:

drivers/net/hamradio/bpqether.c:437:36:
 warning: ‘bpq_seqops’ defined but not used [-Wunused-const-variable=]
 static const struct seq_operations bpq_seqops = {
                                    ^~~~~~~~~~
Use #ifdef macro to gurad this.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/hamradio/bpqether.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 1ad6085994b1..0e623c2e8b2d 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -368,7 +368,7 @@ static int bpq_close(struct net_device *dev)
 
 /* ------------------------------------------------------------------------ */
 
-
+#ifdef CONFIG_PROC_FS
 /*
  *	Proc filesystem
  */
@@ -440,7 +440,7 @@ static const struct seq_operations bpq_seqops = {
 	.stop = bpq_seq_stop,
 	.show = bpq_seq_show,
 };
-
+#endif
 /* ------------------------------------------------------------------------ */
 
 static const struct net_device_ops bpq_netdev_ops = {
-- 
2.17.1


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

end of thread, other threads:[~2021-06-02  0:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 14:00 [PATCH net-next] hamradio: bpqether: Fix -Wunused-const-variable warning YueHaibing
2021-06-02  0:10 ` 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).