Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932106AbdIFM7t (ORCPT ); Wed, 6 Sep 2017 08:59:49 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:61407 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754481AbdIFM7o (ORCPT ); Wed, 6 Sep 2017 08:59:44 -0400 From: Arnd Bergmann To: Kalle Valo Cc: Arnd Bergmann , Colin Ian King , Bartosz Markowski , Govind Singh , Ryan Hsu , Srinivas Kandagatla , Rajkumar Manoharan , Ashok Raj Nagarajan , Ben Greear , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org 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== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1884 Lines: 52 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", -- 2.9.0