From patchwork Tue Sep 6 13:23:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101853 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp546735qgf; Tue, 6 Sep 2016 06:23:03 -0700 (PDT) X-Received: by 10.66.135.175 with SMTP id pt15mr9244034pab.134.1473168183352; Tue, 06 Sep 2016 06:23:03 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o8si27568491pag.70.2016.09.06.06.23.03; Tue, 06 Sep 2016 06:23:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-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-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934325AbcIFNXB (ORCPT + 4 others); Tue, 6 Sep 2016 09:23:01 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:64758 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932806AbcIFNW7 (ORCPT ); Tue, 6 Sep 2016 09:22:59 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0MCMK5-1bqN0O0EKH-0094u0; Tue, 06 Sep 2016 15:22:45 +0200 From: Arnd Bergmann To: Felipe Balbi , Greg Kroah-Hartman Cc: Arnd Bergmann , Heikki Krogerus , John Youn , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH for v4.8] usb: dwc3: mark PM function as __maybe_unused Date: Tue, 6 Sep 2016 15:23:10 +0200 Message-Id: <20160906132318.2033811-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:Xj4BZBeKPhcaJH+7dNIvXbS+0p5DUBnZn3U/duII0yzZ0rAvnyR 9fmehBpBglnBSeVcdHOgjC7dKLSB6N0dWj2gquT3dwwy/2aC9K930kd8g7AAq1b/osCRNrr GBJQ6jvb/T122p8t4waXNlI3WxefVhwyvWqIiO1pWpZy50DZbG/0inl5Cm1REUmdjxMSnRo oe6rexhMqfiI3DaMdWTYQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:MDEBN0WLUEA=:HdpCvYu/ILKMkdgovPaeDN DrMzXJPqCBQeR9KYVKkOakOgbH/QJl0+Y2dPMwNPx6NicY3pRaoJLs16pioaJ/uMEWy0lex2H /BOe2u3T8uQo/vqSDllCeZNFM5h4U9f5XxvlaJln1bC6/iAn6/KSyGDMJWbNbM4sIFTOMZUVE +POuO/XyNsPoXUBcgn72j5d8ZfWy16Z6wz4atnvrNanuF1uQsfxyPX4hexn21rJU63T4KjPys fIqYVlQ1xjR+OF80q5fNgCRZL+mqPqfDqouREsTyOzWU0aYOkMxbgO2sJiMA2QN/V1E8qW/zU pD4MbprO/c2hpG0U0rvG7Z/yEcxKPfL9yXana3TQJf+/2ODh/Ih1h4RTK13F+mvTaRtkejXt0 SU/yC81hThV15vr/e5gjHuHmJdF4bM6n2EmYBh0/bpzfbcolyoc8+aajK7tsirG78gUcAnfJW mlhrh8PtR5m6KeoPE185mqfV9tutsaDdbzaqlaII8smOFWfVfiTee+Vf4aWwmcgFYIeOoZ54B D0kaXVbhCAAySvucsaQnVsJx9AoZxnNnRaxahaXClPrsJAnNUOPCoQEfAw37D9jj6NWarDyzl NbgT6jTg9JKyz+/UdO7haT2xwp0QEoODgHdSM5ai0c/78LYxcIV47bkDCjX7JTusIZK74ZugM lP49ju2uYYCOCvit3Aqui7Sdv5tQhKJONw20durL/0HetSL+tI35klvg1n1Xk86HP/As= Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Starting with v4.8-rc5, we get a warning about the dwc3_pci_pm_dummy function when CONFIG_PM_SLEEP is disabled: drivers/usb/dwc3/dwc3-pci.c:253:12: warning: 'dwc3_pci_pm_dummy' defined but not used Using __maybe_unused instead of #ifdef lets the compiler figure out whether it should drop the definitions silently and avoids this warning. Signed-off-by: Arnd Bergmann Fixes: f6c274e11e3b ("usb: dwc3: pci: runtime_resume child device") --- drivers/usb/dwc3/dwc3-pci.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) After we fixed all other warnings reported by kernelci.org, this is now the only thing we get a warning for in the configurations we build, so it would be good to get this fixed before v4.8 to get a clean build for the first time in a release. -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 0a32430f4c41..6a82b36f0d59 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -234,8 +234,7 @@ static const struct pci_device_id dwc3_pci_id_table[] = { }; MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table); -#ifdef CONFIG_PM -static int dwc3_pci_runtime_suspend(struct device *dev) +static int __maybe_unused dwc3_pci_runtime_suspend(struct device *dev) { if (device_run_wake(dev)) return 0; @@ -243,14 +242,14 @@ static int dwc3_pci_runtime_suspend(struct device *dev) return -EBUSY; } -static int dwc3_pci_runtime_resume(struct device *dev) +static int __maybe_unused dwc3_pci_runtime_resume(struct device *dev) { struct platform_device *dwc3 = dev_get_drvdata(dev); return pm_runtime_get(&dwc3->dev); } -static int dwc3_pci_pm_dummy(struct device *dev) +static int __maybe_unused dwc3_pci_pm_dummy(struct device *dev) { /* * There's nothing to do here. No, seriously. Everything is either taken @@ -262,7 +261,6 @@ static int dwc3_pci_pm_dummy(struct device *dev) */ return 0; } -#endif /* CONFIG_PM */ static struct dev_pm_ops dwc3_pci_dev_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(dwc3_pci_pm_dummy, dwc3_pci_pm_dummy)