Commit 33d77fc0 authored by Randy Dunlap's avatar Randy Dunlap Committed by Greg Kroah-Hartman

staging/rtl8192u: fix defined but not used build warnings

Fix build warnings in rtl8192u when CONFIG_PROC_FS is not enabled
by marking the unused functions as __maybe_unused.

../drivers/staging/rtl8192u/r8192U_core.c:508:12: warning: 'proc_get_stats_ap' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:527:12: warning: 'proc_get_registers' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:568:12: warning: 'proc_get_stats_tx' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:627:12: warning: 'proc_get_stats_rx' defined but not used [-Wunused-function]
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Cc: Jerry chuang <wlanfae@realtek.com>
Cc: devel@driverdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4cd6bacf
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#ifndef R819xU_H #ifndef R819xU_H
#define R819xU_H #define R819xU_H
#include <linux/compiler.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/ioport.h> #include <linux/ioport.h>
......
...@@ -505,7 +505,7 @@ static void watch_dog_timer_callback(struct timer_list *t); ...@@ -505,7 +505,7 @@ static void watch_dog_timer_callback(struct timer_list *t);
static struct proc_dir_entry *rtl8192_proc; static struct proc_dir_entry *rtl8192_proc;
static int proc_get_stats_ap(struct seq_file *m, void *v) static int __maybe_unused proc_get_stats_ap(struct seq_file *m, void *v)
{ {
struct net_device *dev = m->private; struct net_device *dev = m->private;
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
...@@ -524,7 +524,7 @@ static int proc_get_stats_ap(struct seq_file *m, void *v) ...@@ -524,7 +524,7 @@ static int proc_get_stats_ap(struct seq_file *m, void *v)
return 0; return 0;
} }
static int proc_get_registers(struct seq_file *m, void *v) static int __maybe_unused proc_get_registers(struct seq_file *m, void *v)
{ {
struct net_device *dev = m->private; struct net_device *dev = m->private;
int i, n, max = 0xff; int i, n, max = 0xff;
...@@ -565,7 +565,7 @@ static int proc_get_registers(struct seq_file *m, void *v) ...@@ -565,7 +565,7 @@ static int proc_get_registers(struct seq_file *m, void *v)
return 0; return 0;
} }
static int proc_get_stats_tx(struct seq_file *m, void *v) static int __maybe_unused proc_get_stats_tx(struct seq_file *m, void *v)
{ {
struct net_device *dev = m->private; struct net_device *dev = m->private;
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
...@@ -624,7 +624,7 @@ static int proc_get_stats_tx(struct seq_file *m, void *v) ...@@ -624,7 +624,7 @@ static int proc_get_stats_tx(struct seq_file *m, void *v)
return 0; return 0;
} }
static int proc_get_stats_rx(struct seq_file *m, void *v) static int __maybe_unused proc_get_stats_rx(struct seq_file *m, void *v)
{ {
struct net_device *dev = m->private; struct net_device *dev = m->private;
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment