From: YueHaibing Date: Tue, 1 Jun 2021 14:00:52 +0000 (+0800) Subject: hamradio: bpqether: Fix -Wunused-const-variable warning X-Git-Tag: v5.14-rc1~119^2~385 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e516f5be5b17cdae68d14206451b64d36f9588e4;p=thirdparty%2Fkernel%2Flinux.git hamradio: bpqether: Fix -Wunused-const-variable warning 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index 1ad6085994b1c..0e623c2e8b2dc 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 = {