Search Linux Wireless

[PATCH] net/wireless/intersil/hostap: fix defined but not used warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

Fix build warnings in drivers/net/wireless/intersil/hostap/ when
CONFIG_PROC_FS is not enabled by marking the unused functions as
__maybe_unused.

../drivers/net/wireless/intersil/hostap/hostap_ap.c:70:12: warning: 'ap_debug_proc_show' defined but not used [-Wunused-function]
../drivers/net/wireless/intersil/hostap/hostap_ap.c:994:12: warning: 'prism2_sta_proc_show' defined but not used [-Wunused-function]
../drivers/net/wireless/intersil/hostap/hostap_proc.c:16:12: warning: 'prism2_debug_proc_show' defined but not used [-Wunused-function]
../drivers/net/wireless/intersil/hostap/hostap_proc.c:49:12: warning: 'prism2_stats_proc_show' defined but not used [-Wunused-function]
../drivers/net/wireless/intersil/hostap/hostap_proc.c:177:12: warning: 'prism2_crypt_proc_show' defined but not used [-Wunused-function]
../drivers/net/wireless/intersil/hostap/hostap_hw.c:2901:12: warning: 'prism2_registers_proc_show' defined but not used [-Wunused-function]

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Jouni Malinen <j@xxxxx>
Cc: linux-wireless@xxxxxxxxxxxxxxx
Cc: Kalle Valo <kvalo@xxxxxxxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx
---
 drivers/net/wireless/intersil/hostap/hostap_ap.c   |    5 +++--
 drivers/net/wireless/intersil/hostap/hostap_hw.c   |    3 ++-
 drivers/net/wireless/intersil/hostap/hostap_proc.c |    7 ++++---
 3 files changed, 9 insertions(+), 6 deletions(-)

--- linux-next-20180706.orig/drivers/net/wireless/intersil/hostap/hostap_ap.c
+++ linux-next-20180706/drivers/net/wireless/intersil/hostap/hostap_ap.c
@@ -17,6 +17,7 @@
  *   (8802.11: 5.5)
  */
 
+#include <linux/compiler.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/delay.h>
@@ -67,7 +68,7 @@ static void prism2_send_mgmt(struct net_
 
 
 #ifndef PRISM2_NO_PROCFS_DEBUG
-static int ap_debug_proc_show(struct seq_file *m, void *v)
+static int __maybe_unused ap_debug_proc_show(struct seq_file *m, void *v)
 {
 	struct ap_data *ap = PDE_DATA(file_inode(m->file));
 
@@ -991,7 +992,7 @@ static void prism2_send_mgmt(struct net_
 #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
 
 
-static int prism2_sta_proc_show(struct seq_file *m, void *v)
+static int __maybe_unused prism2_sta_proc_show(struct seq_file *m, void *v)
 {
 	struct sta_info *sta = m->private;
 	int i;
--- linux-next-20180706.orig/drivers/net/wireless/intersil/hostap/hostap_proc.c
+++ linux-next-20180706/drivers/net/wireless/intersil/hostap/hostap_proc.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 /* /proc routines for Host AP driver */
 
+#include <linux/compiler.h>
 #include <linux/types.h>
 #include <linux/proc_fs.h>
 #include <linux/export.h>
@@ -13,7 +14,7 @@
 
 
 #ifndef PRISM2_NO_PROCFS_DEBUG
-static int prism2_debug_proc_show(struct seq_file *m, void *v)
+static int __maybe_unused prism2_debug_proc_show(struct seq_file *m, void *v)
 {
 	local_info_t *local = m->private;
 	int i;
@@ -46,7 +47,7 @@ static int prism2_debug_proc_show(struct
 #endif /* PRISM2_NO_PROCFS_DEBUG */
 
 
-static int prism2_stats_proc_show(struct seq_file *m, void *v)
+static int __maybe_unused prism2_stats_proc_show(struct seq_file *m, void *v)
 {
 	local_info_t *local = m->private;
 	struct comm_tallies_sums *sums = &local->comm_tallies;
@@ -174,7 +175,7 @@ static const struct seq_operations prism
 	.show	= prism2_bss_list_proc_show,
 };
 
-static int prism2_crypt_proc_show(struct seq_file *m, void *v)
+static int __maybe_unused prism2_crypt_proc_show(struct seq_file *m, void *v)
 {
 	local_info_t *local = m->private;
 	int i;
--- linux-next-20180706.orig/drivers/net/wireless/intersil/hostap/hostap_hw.c
+++ linux-next-20180706/drivers/net/wireless/intersil/hostap/hostap_hw.c
@@ -32,6 +32,7 @@
 
 
 #include <asm/delay.h>
+#include <linux/compiler.h>
 #include <linux/uaccess.h>
 
 #include <linux/slab.h>
@@ -2898,7 +2899,7 @@ static void hostap_tick_timer(struct tim
 
 
 #ifndef PRISM2_NO_PROCFS_DEBUG
-static int prism2_registers_proc_show(struct seq_file *m, void *v)
+static int __maybe_unused prism2_registers_proc_show(struct seq_file *m, void *v)
 {
 	local_info_t *local = m->private;
 





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux