From patchwork Wed Sep 6 12:58:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9940641 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 BB90C60350 for ; Wed, 6 Sep 2017 13:00:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDA2628B65 for ; Wed, 6 Sep 2017 13:00:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B287628B70; Wed, 6 Sep 2017 13:00:41 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C820C28B6D for ; Wed, 6 Sep 2017 13:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=fKIIU3AbtewFYi/0K3XJYzknuHyM/RQMIpmSrY/7j3w=; b=fwF c5ZJB5oVx0wOvHgd7K1q5Y1YRKMjd+389RM9VmaTOMfmcynpAal+5auBQKYEcm5XBG99y+w/LkvwU ijNGCmP2sQlD1jiuo0wYhg6JlMdPWkKz3uGpl7pTwAkppFvIh7RLmiHH1XRmyUxvyRQH1N0CnnzgV ZDNFbJkrrtqoE98fIMnF+Pmlm62jd8WYWmZBuwsIjJ6MxAw+6fQf2aLwnfAb4Tv/l+uBSSAplW2Sw wCN9l9Jx1g5ea10b5Tc0+r0TQ/pqjnABIXmTHGhgjeapmvHP/lUGFoHvKVgaA7Xpow7HwxLxVXJhb wYFmpGqlxoUY0suMypFADiljEKZl6Bw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dpZvk-0007nG-38; Wed, 06 Sep 2017 12:59:44 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dpZvg-0007kO-Bp for ath10k@lists.infradead.org; Wed, 06 Sep 2017 12:59:42 +0000 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MVLtW-1dyp4n2ZOo-00YmEV; Wed, 06 Sep 2017 14:59:07 +0200 From: Arnd Bergmann To: Kalle Valo Subject: [PATCH] ath10: mark PM functions as __maybe_unused Date: Wed, 6 Sep 2017 14:58:53 +0200 Message-Id: <20170906125904.2588620-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:lplKrPTQdrG1ngYdQ38fk5EyYiH6HJ3adabrs2BPwJE+chqVijm J6yF7v0hF5jO6sCNbyV77+spU4hpF0JWLUUInjer9q9LRj76lZJbFJUXaVosAa6mDIjFved AwcVwzuU5/lR9PAGZTBaYcR9ZHiwLiUxSQ1oK6s6+JZMjwytfqxNVjrgYaCZT21dB5UHB35 nWwmaFpu0HqzEot0ZKm8g== X-UI-Out-Filterresults: notjunk:1; V01:K0:alKtr2AdNSA=:qvE8/+NnNZ1ZcZrynm0Z3Z 0p09nFrJKxjaf/ylNeAThs3KwViy+PMTjhbqXn0T6661ws2KXt9qDixMU3vFbuEJSYgUXUBtM 6RDMWcXSddrRRrZ6MXGj2rjrPnEKqOWdN6JpwErBCjstG+SzW5jGnyVcvt5Ba7wSP3mEUM3Se hkJFS51fer0k+0Xg+7APn3CeRGnq5yuNJ5H/9h+jGKjLHGbMbkDOTg8HAxTwkFtvzzzOCpKDs dzGYmp6aNuzxvJ2MiUXrcykE0Jt1zgfZGbUW32+i30IohxAv4hmVUuTVTH+2vYDLjUF953UwO RChnUC6pksQ2E8wCeltNqhpnxuZmFaKVhw89p6o63Cn20iDSwFtNW06AbgEL7aFtQZnh3als0 uM1JK0F3/bkiS9ScDSA7J1SOBL6zOydibHF7vT6pd4Rlb367YZy/yPYMZxY1cDOaDLxj0Zz9/ Zs7oSSLELLVU+b5H/E/LALapkg6H09IlA9dPhdPMTc1bW7NXvPncHyRPgXIf4Mj9cddbTKk4H aYsiFiyQGIcpRJNlSWgRCGewuo4ZhxT8tx52k9/eX4Par7Ul01o6edid85Rkcht1ygP7As75Z hHgtoZr2ltgNKjfW4mJy59eLchBpPEPRXgVjjPQZDatyR2L2Kz/JiLZ1YSfl9P8QfEj2ackaa 268D9XJk5C/GfqoLXjylFTSFYoPhdZU2nbmawKUYMXCvZAJRTjoxIY3OdtpxkGgrnHvUKheIU WbywsBQjSa5K4nfS52C/WO9SB2WwjgVopL2oNw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170906_055940_762347_364A8602 X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Govind Singh , Ryan Hsu , Arnd Bergmann , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Rajkumar Manoharan , ath10k@lists.infradead.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla , Colin Ian King , Ben Greear , Ashok Raj Nagarajan , Bartosz Markowski MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When CONFIG_PM_SLEEP is disabled, we get a compile-time warning: drivers/net/wireless/ath/ath10k/pci.c:3417:12: error: 'ath10k_pci_pm_resume' defined but not used [-Werror=unused-function] static int ath10k_pci_pm_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath10k/pci.c:3401:12: error: 'ath10k_pci_pm_suspend' defined but not used [-Werror=unused-function] static int ath10k_pci_pm_suspend(struct device *dev) Rather than fixing the #ifdef, this just marks both functions as __maybe_unused, which is a more robust way to do this. Fixes: 32faa3f0ee50 ("ath10k: add the PCI PM core suspend/resume ops") Signed-off-by: Arnd Bergmann --- drivers/net/wireless/ath/ath10k/pci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index bc1633945a56..195dafb98131 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -3396,9 +3396,7 @@ static void ath10k_pci_remove(struct pci_dev *pdev) MODULE_DEVICE_TABLE(pci, ath10k_pci_id_table); -#ifdef CONFIG_PM - -static int ath10k_pci_pm_suspend(struct device *dev) +static __maybe_unused int ath10k_pci_pm_suspend(struct device *dev) { struct ath10k *ar = dev_get_drvdata(dev); int ret; @@ -3414,7 +3412,7 @@ static int ath10k_pci_pm_suspend(struct device *dev) return ret; } -static int ath10k_pci_pm_resume(struct device *dev) +static __maybe_unused int ath10k_pci_pm_resume(struct device *dev) { struct ath10k *ar = dev_get_drvdata(dev); int ret; @@ -3433,7 +3431,6 @@ static int ath10k_pci_pm_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(ath10k_pci_pm_ops, ath10k_pci_pm_suspend, ath10k_pci_pm_resume); -#endif static struct pci_driver ath10k_pci_driver = { .name = "ath10k_pci",