Pls ignore this, there has a fix.

[PATCH] staging/rtl8192u: fix defined but not used build warnings

On 2018/7/13 16:01, YueHaibing wrote:
> 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 <yuehaib...@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)
>  {
> 

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to