From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935043AbcIFNXB (ORCPT ); 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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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. 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) -- 2.9.0