lkml.org 
[lkml]   [2018]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] staging/rtl8192u: hide unused procfs helpers
Date
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@huawei.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

\
 
 \ /
  Last update: 2018-07-15 22:06    [W:0.035 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site