From patchwork Mon Dec 11 11:46:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10104839 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 CE08B602A7 for ; Mon, 11 Dec 2017 11:47:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84E5029557 for ; Mon, 11 Dec 2017 11:47:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7693829555; Mon, 11 Dec 2017 11:47:39 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 01A3F29555 for ; Mon, 11 Dec 2017 11:47:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752967AbdLKLri (ORCPT ); Mon, 11 Dec 2017 06:47:38 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:57205 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752566AbdLKLrf (ORCPT ); Mon, 11 Dec 2017 06:47:35 -0500 Received: from wuerfel.lan ([149.172.96.106]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MA5UH-1eDc7U1BCT-00BMRf; Mon, 11 Dec 2017 12:47:21 +0100 From: Arnd Bergmann To: Kalle Valo Cc: Arnd Bergmann , "Reizer, Eyal" , Johannes Berg , Iain Hunter , Arend Van Spriel , Kees Cook , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] wlcore: fix unused function warning Date: Mon, 11 Dec 2017 12:46:29 +0100 Message-Id: <20171211114718.3637010-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:4Gf9ASHqFqHjMRqP08Vf0iLfAPS/IVgJ8zZKdi3uYwY9iAvY6Mf dJuaElFHBbW7nUxbr5F7s2AYYtwUKaR6bkt2K1E2Ywiy5GT29//hViLPeCmq3ETgLsQqdb5 KuBxz22tOhe4CL++8jGJxDAHjnbKYtmFViOKslU6LlyKOCUxRkqnHzby3Sh5uXalge5VmVM HsHF2Q7eS/O2/oHxSXS/w== X-UI-Out-Filterresults: notjunk:1; V01:K0:c/N1Qz5AqdA=:B96S14aF8HZWU483sOj1DE iGO8GiBTKQTxGw318W8s3XSaOYxPaq2u8FJtggRfiq4JlUJKOrQiuh04/hg2WL/T/bIMjPbi1 IUNt5oP83DmlqnGO7p54bZn4XhmPxUXedZu408yXSjWkCuB3zfUdXCzyOVQ+BucHo28JOGvdu z/Lz1Hj0dRUMWuPc5JYRNKgon770QvSbCul4RxGyeGhB5Iu2bVsuWGoOA+uXjBfezVvIH8A3e /uxO3nNWDGnr7PnTL4XkKEwBlp4wT2J3yt1XRFNx+7OPDcEq4/pUdmI3AWHQVGkvt7HyZq2na qs949YSOYAXUQvFuR9EhrQydv0+GD5N+hocQdWhXeMADBXqboM6x4t46qdGH7F1NpxGpNW3JC lOqnobKvAgO+hWKaDHv7xjQE92tueUINmTrftdBvBksl2A74rslk1DHK+ceeYRlIJw9YFZgBX c7uGXMt52cAPv2SdYQa0kEeJCTBJLyx5h8yCP5nKVflLh2sLnU88Ie0NcXalg1R01jLKsgTnE dcHcjPQO6YnNK3zu7jMbysYQHjvnf4f5Zgvmw4bahqaRfb4QiKcPBx1WuZ2WrNEaHJEirgOWy Mjw+HA35CcZy/TVYj+m+k6NpvahvL1XbntEza+qMJsrFsinLirR2KMSeTj9wfbSrixyVlb1mW MohkulWnw24Yclxpa2piLlyElTOZ3rv/PieDXJWJTGZDA00bXeBmPyxJSUvhbe0IV3B3NenRL 2oEdGxubzt6LRl1IkgfPMYMDTGdAdmjjyDtVMQ== 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 The newly added wlcore_fw_sleep function is called conditionally, which causes a warning without CONFIG_PM: drivers/net/wireless/ti/wlcore/main.c:981:12: error: 'wlcore_fw_sleep' defined but not used [-Werror=unused-function] Instead of trying to keep track of what should be in the #ifdef and what should not, it's easier to mark the top-level suspend/resume functions as __maybe_unused so the compiler can silently drop all the unused code. Fixes: 37bf241b8e7b ("wlcore: allow elp during wowlan suspend") Signed-off-by: Arnd Bergmann --- drivers/net/wireless/ti/wlcore/acx.h | 2 -- drivers/net/wireless/ti/wlcore/main.c | 8 +++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/acx.h b/drivers/net/wireless/ti/wlcore/acx.h index f46d7fdf9a00..7011c5d9599f 100644 --- a/drivers/net/wireless/ti/wlcore/acx.h +++ b/drivers/net/wireless/ti/wlcore/acx.h @@ -1129,10 +1129,8 @@ int wl12xx_acx_config_hangover(struct wl1271 *wl); int wlcore_acx_average_rssi(struct wl1271 *wl, struct wl12xx_vif *wlvif, s8 *avg_rssi); -#ifdef CONFIG_PM int wl1271_acx_default_rx_filter_enable(struct wl1271 *wl, bool enable, enum rx_filter_action action); int wl1271_acx_set_rx_filter(struct wl1271 *wl, u8 index, bool enable, struct wl12xx_rx_filter *filter); -#endif /* CONFIG_PM */ #endif /* __WL1271_ACX_H__ */ diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 6ce457022dc9..09714034dbf1 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -1343,7 +1343,6 @@ static struct sk_buff *wl12xx_alloc_dummy_packet(struct wl1271 *wl) } -#ifdef CONFIG_PM static int wl1271_validate_wowlan_pattern(struct cfg80211_pkt_pattern *p) { @@ -1715,8 +1714,8 @@ static void wl1271_configure_resume(struct wl1271 *wl, struct wl12xx_vif *wlvif) } } -static int wl1271_op_suspend(struct ieee80211_hw *hw, - struct cfg80211_wowlan *wow) +static int __maybe_unused wl1271_op_suspend(struct ieee80211_hw *hw, + struct cfg80211_wowlan *wow) { struct wl1271 *wl = hw->priv; struct wl12xx_vif *wlvif; @@ -1810,7 +1809,7 @@ static int wl1271_op_suspend(struct ieee80211_hw *hw, return 0; } -static int wl1271_op_resume(struct ieee80211_hw *hw) +static int __maybe_unused wl1271_op_resume(struct ieee80211_hw *hw) { struct wl1271 *wl = hw->priv; struct wl12xx_vif *wlvif; @@ -1894,7 +1893,6 @@ static int wl1271_op_resume(struct ieee80211_hw *hw) return 0; } -#endif static int wl1271_op_start(struct ieee80211_hw *hw) {