[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180713080146.8268-1-yuehaibing@huawei.com>
Date: Fri, 13 Jul 2018 16:01:46 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <gregkh@...uxfoundation.org>, <christophe.jaillet@...adoo.fr>
CC: <linux-kernel@...r.kernel.org>, <devel@...verdev.osuosl.org>,
YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH] staging/rtl8192u: hide unused procfs helpers
When CONFIG_PROC_FS isn't set, gcc warning this:
drivers/staging/rtl8192u/r8192U_core.c:508:12: warning: ‘proc_get_stats_ap’ defined but not used [-Wunused-function]
static int proc_get_stats_ap(struct seq_file *m, void *v)
^
drivers/staging/rtl8192u/r8192U_core.c:527:12: warning: ‘proc_get_registers’ defined but not used [-Wunused-function]
static int proc_get_registers(struct seq_file *m, void *v)
^
drivers/staging/rtl8192u/r8192U_core.c:568:12: warning: ‘proc_get_stats_tx’ defined but not used [-Wunused-function]
static int proc_get_stats_tx(struct seq_file *m, void *v)
^
drivers/staging/rtl8192u/r8192U_core.c:627:12: warning: ‘proc_get_stats_rx’ defined but not used [-Wunused-function]
static int proc_get_stats_rx(struct seq_file *m, void *v)
^
fix this by adding #ifdef around them.
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 8b17400..b9724d9 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -505,6 +505,7 @@ static void watch_dog_timer_callback(struct timer_list *t);
static struct proc_dir_entry *rtl8192_proc;
+#ifdef CONFIG_PROC_FS
static int proc_get_stats_ap(struct seq_file *m, void *v)
{
struct net_device *dev = m->private;
@@ -639,6 +640,7 @@ static int proc_get_stats_rx(struct seq_file *m, void *v)
return 0;
}
+#endif
static void rtl8192_proc_module_init(void)
{
--
2.7.0
Powered by blists - more mailing lists