Message ID | 20210601140052.31456-1-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e516f5be5b17cdae68d14206451b64d36f9588e4 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] hamradio: bpqether: Fix -Wunused-const-variable warning | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 5 of 5 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 16 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Tue, 1 Jun 2021 22:00:52 +0800 you wrote: > 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. > > [...] Here is the summary with links: - [net-next] hamradio: bpqether: Fix -Wunused-const-variable warning https://git.kernel.org/netdev/net-next/c/e516f5be5b17 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
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 = {
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(-)