All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/wireless/intersil/hostap: fix defined but not used warnings
@ 2018-07-07 15:35 Randy Dunlap
  2018-07-31  7:07   ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2018-07-07 15:35 UTC (permalink / raw)
  To: Jouni Malinen, linux-wireless, Kalle Valo, David Miller, netdev

From: Randy Dunlap <rdunlap@infradead.org>

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@infradead.org>
Cc: Jouni Malinen <j@w1.fi>
Cc: linux-wireless@vger.kernel.org
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
---
 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;
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/wireless/intersil/hostap: fix defined but not usedwarnings
@ 2018-07-31  7:07   ` Kalle Valo
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-07-31  7:07 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Jouni Malinen, linux-wireless, David Miller, netdev

Randy Dunlap <rdunlap@infradead.org> wrote:

> From: Randy Dunlap <rdunlap@infradead.org>
> 
> 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@infradead.org>
> Cc: Jouni Malinen <j@w1.fi>
> Cc: linux-wireless@vger.kernel.org
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: netdev@vger.kernel.org

I'll drop this as I take Yue's patch.

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/patch/10512915/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/wireless/intersil/hostap: fix defined but not usedwarnings
@ 2018-07-31  7:07   ` Kalle Valo
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-07-31  7:07 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Jouni Malinen, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	David Miller, netdev-u79uwXL29TY76Z2rM5mHXA

Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:

> From: Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> 
> 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-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> Cc: Jouni Malinen <j@w1.fi>
> Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> Cc: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
> Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

I'll drop this as I take Yue's patch.

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/patch/10512915/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-31  8:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-07 15:35 [PATCH] net/wireless/intersil/hostap: fix defined but not used warnings Randy Dunlap
2018-07-31  7:07 ` [PATCH] net/wireless/intersil/hostap: fix defined but not usedwarnings Kalle Valo
2018-07-31  7:07   ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.