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: 121374 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2684832qgn; Mon, 11 Dec 2017 03:47:39 -0800 (PST) X-Google-Smtp-Source: ACJfBou1xv88FYhC9KuryLNIRyRJG2aQXeLW0F0pkgN4G1cXcuV+kVB1qJXhG/B6ls4cW5outMcq X-Received: by 10.98.18.157 with SMTP id 29mr132617pfs.84.1512992859333; Mon, 11 Dec 2017 03:47:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512992859; cv=none; d=google.com; s=arc-20160816; b=sx5ZGS621LPpmTIwUzcVB+/LwjV6McdPdQVftnVUxoWjCfjRhLjEVrjB2ck3TXZ/Jq hMa3fhmNEAV1d+6Ns4IafguWW5DsI4lURfqcXxZxY5Kha2VlH2rzoQ6dVX8qFagrDFZh h9+o6+bqRUGs+CGjFxyzHj4NWL5gsv9otAmVu+iyXvfv/uQmhLiZOALiADpytHNOv2Az gMl2hXdLUivrPmMc/iFZuiiKvi7Dm7p0jGHZ4EJDD//LR+yPkhQLGAYiCFwWLh76RUOR JnYegObeWpOaDE8ggFGz/xjwBe+Ja0OGA1aOXzrPtV1p0fQnEtybwDGJ5UDndLvn/rVi uu3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=zUy7RX+GzefhJ+T73EuM9fcFXJZ+0Qnk9haJrH9h6aI=; b=vfuDV2jJhJQzIn0osmgwmnXCVwCOdYw6/ap+ebFgJkpgTCxanUjRiUcJom40uAkAoP kw5LS+newl3YGgoKxL63gJuogO546JWbx470/6C7hR4CSq+c9xNtFTNK4XmYzSRoFHQT YLk58Bwo6A1E7MBTGZuKr6Dh57rRXvioDw4dAIbaMODxX2cD8BuVLjmixuQqiOixfQKi Qcl7Ju8PGPSLXmjRbxEArpAcAlojWQFwJoJAp4LAGv3aQEBuJRe183o3AGwz1Zfvv9xM GmI+oNEVmcQNERZnp4XoVU71SwFc8DgaL7VXSUzBO/zgLJMIAVWX12BiVgM3LZDpROfK anNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si10048266pll.15.2017.12.11.03.47.39; Mon, 11 Dec 2017 03:47:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752967AbdLKLri (ORCPT + 2 others); 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 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(-) -- 2.9.0 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) {