From patchwork Sat Jul 7 15:35:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10512915 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DC444600CA for ; Sat, 7 Jul 2018 15:35:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D431428884 for ; Sat, 7 Jul 2018 15:35:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7F2F2888C; Sat, 7 Jul 2018 15:35:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34BCF28884 for ; Sat, 7 Jul 2018 15:35:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753949AbeGGPfO (ORCPT ); Sat, 7 Jul 2018 11:35:14 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49034 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753854AbeGGPfN (ORCPT ); Sat, 7 Jul 2018 11:35:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Subject:From:To:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=IhXpt+sf7QYGGMgb7man1xTxLVpdN2XQ/vxOZZb7kgM=; b=OhREy9C0U3kdTeVHAqgukBoFQ K5WLROcJBN0HIocxk82sUtXTbh5UHuncitmNXGVIhQx0cnygPAtYx3NQEL+2421UCRtUlIrfhsgC0 BImkrWvFlkru6z+XDeJkQ7ZmRf8o8oa/w3fHm5gheZ4zClJNaX8nkcp98KcYfYDf2xzg6CMLrETRq DHHpiQgvlOF/K03ztxYPyLhzLwz+01IPnOjXk7CasYOnn4te7GxVugbN5O9QZfum0s0aA5RiDw+hU pqwB6ADYpN/ustEZqzrJ7D7bLADBnmS0euVKF2bvTwpY7rjWHu09HmV2ckolvwe43P7PjSD5E5p7X tMn8SUX5g==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fbpEu-0004Td-Gj; Sat, 07 Jul 2018 15:35:12 +0000 To: Jouni Malinen , linux-wireless@vger.kernel.org, Kalle Valo , David Miller , "netdev@vger.kernel.org" From: Randy Dunlap Subject: [PATCH] net/wireless/intersil/hostap: fix defined but not used warnings Message-ID: Date: Sat, 7 Jul 2018 08:35:11 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 Content-Language: en-US Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap 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 Cc: Jouni Malinen Cc: linux-wireless@vger.kernel.org Cc: Kalle Valo Cc: "David S. Miller" 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 #include #include #include @@ -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 #include #include #include @@ -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 +#include #include #include @@ -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;