]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
atmel: hide unused procfs helpers
authorYueHaibing <yuehaibing@huawei.com>
Fri, 13 Jul 2018 06:46:58 +0000 (14:46 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 31 Jul 2018 07:20:57 +0000 (10:20 +0300)
When CONFIG_PROC_FS isn't set, gcc warning this:

drivers/net/wireless/atmel/atmel.c:1402:12: warning: ‘atmel_proc_show’ defined but not used [-Wunused-function]
 static int atmel_proc_show(struct seq_file *m, void *v)
            ^
fix this by adding #ifdef around it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/atmel/atmel.c

index 3ed3d9f6aae91b5a76d6caee9ac714b1824db6d5..f4f56f461b61b91bb256a15be8565acd54870658 100644 (file)
@@ -1399,6 +1399,7 @@ static int atmel_validate_channel(struct atmel_private *priv, int channel)
        return 0;
 }
 
+#ifdef CONFIG_PROC_FS
 static int atmel_proc_show(struct seq_file *m, void *v)
 {
        struct atmel_private *priv = m->private;
@@ -1481,6 +1482,7 @@ static int atmel_proc_show(struct seq_file *m, void *v)
        seq_printf(m, "Current state:\t\t%s\n", s);
        return 0;
 }
+#endif
 
 static const struct net_device_ops atmel_netdev_ops = {
        .ndo_open               = atmel_open,