From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> 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: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Cc: Jerry chuang <wlanfae@xxxxxxxxxxx> Cc: devel@xxxxxxxxxxxxxxxxxxxx Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/rtl8192u/r8192U.h | 1 + drivers/staging/rtl8192u/r8192U_core.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) --- linux-next-20180706.orig/drivers/staging/rtl8192u/r8192U.h +++ linux-next-20180706/drivers/staging/rtl8192u/r8192U.h @@ -18,6 +18,7 @@ #ifndef R819xU_H #define R819xU_H +#include <linux/compiler.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/ioport.h> --- linux-next-20180706.orig/drivers/staging/rtl8192u/r8192U_core.c +++ linux-next-20180706/drivers/staging/rtl8192u/r8192U_core.c @@ -505,7 +505,7 @@ static void watch_dog_timer_callback(str 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 r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); @@ -524,7 +524,7 @@ static int proc_get_stats_ap(struct seq_ 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; int i, n, max = 0xff; @@ -565,7 +565,7 @@ static int proc_get_registers(struct seq 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 r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); @@ -624,7 +624,7 @@ static int proc_get_stats_tx(struct seq_ 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 r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel