From patchwork Wed Mar 2 15:24:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102629 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2443368lbc; Wed, 2 Mar 2016 07:25:10 -0800 (PST) X-Received: by 10.98.12.8 with SMTP id u8mr39004409pfi.36.1456932310025; Wed, 02 Mar 2016 07:25:10 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sm10si19668135pab.78.2016.03.02.07.25.09; Wed, 02 Mar 2016 07:25:09 -0800 (PST) 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 S1754659AbcCBPZH (ORCPT + 4 others); Wed, 2 Mar 2016 10:25:07 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:62693 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754146AbcCBPZG (ORCPT ); Wed, 2 Mar 2016 10:25:06 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0McAb5-1aHgFJ3Uj1-00Jc9f; Wed, 02 Mar 2016 16:24:34 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, Felipe Balbi , Alan Stern , linux-usb@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 1/6] usb: host: unhide suspend/resume declarations Date: Wed, 2 Mar 2016 16:24:03 +0100 Message-Id: <1456932255-71725-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456932255-71725-1-git-send-email-arnd@arndb.de> References: <1456932255-71725-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:yBUEjJm4gKEsNu3TsU3v1an/dcoVrphhsXdzZCyKfQ0v2hmjZxP eHD0/j3IDKYlPAfuRZfsMcPcXA9Md05AZY/olxvW9ImP5uybqKWN7xblRekHOjefKxufyjp sskiGCmEh1L0sFqyh6QXaEiOGUSnALGBQh2djL0zlFe3KuotxyOlnhRGaJ4jS31v9f3w/+w tPIW/ZeXX4wosXPogmIfA== X-UI-Out-Filterresults: notjunk:1; V01:K0:yvhnXK/RVkA=:N3HZUMY7tIZKr7Wbmd8Siz Xi/YTVO9QzhWpmfjnKFx6CjVtKGdDnhhD4yDckWK8aKdIngLvdZ69x5CETSmsbswNrt49xvoE 8YsMXRjoICeuhG4HqnYoFPmgx3LPG/jpMvszM6EGOlpdX3YBeruoz6+SZ/ORV3DfTGaw7v1ZQ OvM/dF2PHp1dPb9+pzZ3T2gO7PbuQdSSEQuymdl7MTP1Uw4zD/LP/USkoLCOkJ3x5swsCMNOt nJ/u3597OZK93UBAU/+CAy2/Qf64aXJJ51HdWei+P2D7JEA5uaSPAGMVBPWcyHwM+i1EJfbIw RUuqtPzCJ5K9xEbPhWfzovsazA2KkrVVSCGpyf5s2O4QtjYFDw3rtMldHec+eSRzZJP57LJ/x j5jMlC0avDaGXfyR3K/mrXx8281qi+MX7HljgYhs1Ef66tAk4vDuW2MkVvMaCWHz+MYJiNQE2 So/Ci/CuTyVStvsLTrLVGJce5agtT/sZpU9b9LMnk5pWayYEiYebTAd0uEZoJZ/ngfUyD4gDN QjtDSbfyVa2422Yx9PgihFf5L6F7GMZTJ/HSXr8vde5Twf70RA0ay66vus+IibOr5wj9WmEPC bJ+rRcjUzLAPALLMARveHfHAv8OSFo+83Sk6aVMXJas/el2zJQ8Ya/5hS2N6naaz3L4oFIsHp vM57OzvI9slHNH4sGLUbZAk2BdgUpfLtd623c3Ax946pZvq+w0jRhW3pc2ymT3jVrWC0= Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org There is no need to hide function declarations, and making these visible to the SoC specific host drivers lets us use __maybe_unused and IS_ENABLED() checks to control their use, rather than having to use #ifdef to hide all callers. Signed-off-by: Arnd Bergmann --- drivers/usb/host/ehci.h | 2 -- drivers/usb/host/ohci.h | 2 -- 2 files changed, 4 deletions(-) -- 2.7.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/host/ehci.h b/drivers/usb/host/ehci.h index 2ddf35203c05..3f3b74aeca97 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -888,12 +888,10 @@ extern int ehci_handshake(struct ehci_hcd *ehci, void __iomem *ptr, u32 mask, u32 done, int usec); extern int ehci_reset(struct ehci_hcd *ehci); -#ifdef CONFIG_PM extern int ehci_suspend(struct usb_hcd *hcd, bool do_wakeup); extern int ehci_resume(struct usb_hcd *hcd, bool force_reset); extern void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci, bool suspending, bool do_wakeup); -#endif /* CONFIG_PM */ extern int ehci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength); diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index bc462288cfb0..37f1725e7a46 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -735,10 +735,8 @@ extern void ohci_init_driver(struct hc_driver *drv, const struct ohci_driver_overrides *over); extern int ohci_restart(struct ohci_hcd *ohci); extern int ohci_setup(struct usb_hcd *hcd); -#ifdef CONFIG_PM extern int ohci_suspend(struct usb_hcd *hcd, bool do_wakeup); extern int ohci_resume(struct usb_hcd *hcd, bool hibernated); -#endif extern int ohci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength); extern int ohci_hub_status_data(struct usb_hcd *hcd, char *buf); From patchwork Wed Mar 2 15:24:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102626 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2443762lbc; Wed, 2 Mar 2016 07:25:54 -0800 (PST) X-Received: by 10.98.15.67 with SMTP id x64mr8383175pfi.60.1456932354416; Wed, 02 Mar 2016 07:25:54 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 79si58747358pfm.61.2016.03.02.07.25.54; Wed, 02 Mar 2016 07:25:54 -0800 (PST) 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 S1755118AbcCBPZv (ORCPT + 4 others); Wed, 2 Mar 2016 10:25:51 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:51047 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755109AbcCBPZu (ORCPT ); Wed, 2 Mar 2016 10:25:50 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MHcm8-1acF6r0bIS-003Kai; Wed, 02 Mar 2016 16:25:13 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman , Kishon Vijay Abraham I Cc: linux-arm-kernel@lists.infradead.org, Felipe Balbi , Alan Stern , linux-usb@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 5/6] phy: dm816x: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:24:07 +0100 Message-Id: <1456932255-71725-6-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456932255-71725-1-git-send-email-arnd@arndb.de> References: <1456932255-71725-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:183lNtALx3Z6I+8QPHts5ugXXOW0qdEzScRxCzztVMxOnXfDH9I 3Q2Wv8BKJdEF7E8JWgwgC2Y77Vkh4sr53GKXa3DPNCECgcRz6Ji7B+7Op2+wHCeinDW6hUf uOAAjpSg7aRrT/FSXAzWJDK3oUn3UGkfVFqj0nwtUqJ8HAwewWWL8tNRvOcV7vZEku1SRan 8NS5a8v8Nx3WBNxb/apqg== X-UI-Out-Filterresults: notjunk:1; V01:K0:qfKxmUypp5g=:LU8N79A/bi9jUUulJBOYH4 FA4PchDO9+vDMrFKw1LMaUUQ8iXEuoHaypGpKbF9cKZO4oTTqJjbg5Jwz5ehEnLO6ZVusHKPL +h040SBbpRsjocxCbFcjhEhlU7FEMiLS5V7ayqMZ//OdziWrKCINLXyi7AWegepIsMkdrFHX5 Amn+PZJwUU44n5vgPCRStV+6Tmyew9IaP0bYhR4WIZGZFPxzFeGqyB2sZUGdsw5BR4P5yenUp LYvb/HWHAexy7G+5BcNo5TuC5fgJrBo2aLciocWqBgl2l8yNVFxxqlJsc5U2CDWakyKRd1L1G uDcP2aocDlN3ggmxDOpgD1+IC4uME/jmnZZIFMHEXzOvzLr6Hpm5gulPmGaBO/UHHlnaHe5s4 5IDWIU/QT0XWvsl71gl9qpUlp+pEXo7YCgWry5XdL8smpAc9TmNgiAkK5raG+sEvk/HeokTcd l1jot6lPEhrTDb6mIB9A6oBsfoF0BqpcrIjgB6pQ6jbvG/KrHFLcQqKNcZ62Zc+r66d1f9GzA orCSakCVpZUJUJbiC9kRzva/dU0EwwWC1eUPkiax97ov4SofhiPC50EUIoytyLpszGDFiRmQW ny6t3PXXsPUMj/nyfm7IKeSo9lN4HbK1rXxeI8bn8O5GaziUXokp2yjmnK+FTkib9S/T1A7Em adZKxmjmdqZcDX/UKEr3KXzlcsfmQVnIO0rNILrul1/FQHYZwpuaEZvIwd0P68ejTk40= Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The dm816x USB PHY driver uses UNIVERSAL_DEV_PM_OPS to access its suspend/resume functions, which causes a warning about unused symbols when CONFIG_PM is disabled: drivers/phy/phy-dm816x-usb.c:121:12: error: 'dm816x_usb_phy_runtime_suspend' defined but not used [-Werror=unused-function] drivers/phy/phy-dm816x-usb.c:139:12: error: 'dm816x_usb_phy_runtime_resume' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann --- drivers/phy/phy-dm816x-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.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/phy/phy-dm816x-usb.c b/drivers/phy/phy-dm816x-usb.c index b4bbef664d20..cbcce7cf0028 100644 --- a/drivers/phy/phy-dm816x-usb.c +++ b/drivers/phy/phy-dm816x-usb.c @@ -118,7 +118,7 @@ static const struct phy_ops ops = { .owner = THIS_MODULE, }; -static int dm816x_usb_phy_runtime_suspend(struct device *dev) +static int __maybe_unused dm816x_usb_phy_runtime_suspend(struct device *dev) { struct dm816x_usb_phy *phy = dev_get_drvdata(dev); unsigned int mask, val; @@ -136,7 +136,7 @@ static int dm816x_usb_phy_runtime_suspend(struct device *dev) return 0; } -static int dm816x_usb_phy_runtime_resume(struct device *dev) +static int __maybe_unused dm816x_usb_phy_runtime_resume(struct device *dev) { struct dm816x_usb_phy *phy = dev_get_drvdata(dev); unsigned int mask, val;