From: Randy Dunlap <rdunlap@infradead.org>
To: Jouni Malinen <j@w1.fi>,
linux-wireless@vger.kernel.org, Kalle Valo <kvalo@codeaurora.org>,
David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH] net/wireless/intersil/hostap: fix defined but not used warnings
Date: Sat, 7 Jul 2018 08:35:11 -0700 [thread overview]
Message-ID: <b2a357a4-dfae-5561-deda-33b2124fc4cf@infradead.org> (raw)
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;
next reply other threads:[~2018-07-07 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-07 15:35 Randy Dunlap [this message]
[not found] ` <b2a357a4-dfae-5561-deda-33b2124fc4cf-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2018-07-31 7:07 ` [PATCH] net/wireless/intersil/hostap: fix defined but not usedwarnings Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2a357a4-dfae-5561-deda-33b2124fc4cf@infradead.org \
--to=rdunlap@infradead.org \
--cc=davem@davemloft.net \
--cc=j@w1.fi \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox