From patchwork Wed Mar 2 15:24:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102624 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2444130lbc; Wed, 2 Mar 2016 07:26:39 -0800 (PST) X-Received: by 10.66.187.36 with SMTP id fp4mr39371940pac.47.1456932399778; Wed, 02 Mar 2016 07:26:39 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id rt5si20030119pab.98.2016.03.02.07.26.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 07:26:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab8ei-0004a0-Vg; Wed, 02 Mar 2016 15:25:41 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab8eI-00035K-48 for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 15:25:16 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0Lb6xp-1aCqOC1OLx-00kflZ; Wed, 02 Mar 2016 16:24:53 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Subject: [PATCH 3/6] usb: ohci-at91: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:24:05 +0100 Message-Id: <1456932255-71725-4-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:C8d8Wuw0ugRdR7jyDIMPrTHs8diPMYwvKUFE9RXw5+RDjGyZrF8 l4aagpVYyiaZUoF6lc2tSNEJgODMMcJVaqgL5WdRVjnfIxhuNwTxtwnNt9G9AAKYPFkKEc8 023iTyRH8NtyUErB4J5bAGm2yoaKlVRbJlNxSG1mdsskj0+UZd72ICQLoA0jn1MpN5jhg89 SZfm9Z5ob6PRL8KGSJdLw== X-UI-Out-Filterresults: notjunk:1; V01:K0:3QMBR+nCjcg=:EzDjO/BQUiu1OWaVeewyGh tmbh2mkIPvoa+JHnA4llBm5/mSbiEgBjsSfB7UANLFZWoVEQwuklUmN/PVfK8+W+vGeEDRdMi qVkAm1qSbNJ5TNZu2IPCoPDLs/AxQ9ArNDAy7RLU6UwKLb4j5G990xrYz6o6AioZUsAon3c0a lRWBCALffFLr8o60w5FHFBTnbis+2cWG5rq/cI3DVGnjMSyyHfnH5HIpdunpMExH6GjbXh3Q8 QaUc2cbJ7AhEeduiQWM+CxG1bhyQzwXvqPIBEVNQG2c8tvjBHC7vCwyuMrbGT+4mmMhkXQszF TRQihsNeFU5cOvIXiMoyYzSpHKIIZfw75IpdHOrARlREAVS/FWWFIcExbSnDJAy40z4SMXVwW iufpcxlUX3dUuwcjyWv55Dav8CADiNhmf1o+5qL0T12QuoguwxpwYZn8+0pWwNE5CGwlBWsko fUifaY45nUkMvJflYkfJYa3mfxpjOQzMpYwimnBo/PBfezwIDa9vmDcd310qnLvwrMV94QpU8 eyrJBOhxN7BMh8+v0/qWIc1IGTEElaWkVqhIv6gV3cqAlQmCOX3JeFNJWZW8Nxhddkkhg2sB0 WHujFSCOrmDE2aHdx3zRluw/kKvDclIvD8hfRCUDqgTzWjPH/xsA2DX5J3c3BinFdQEyRorAF Xh9iXBa1VhzQZZkd/rmvCLV98/qHbpzeJ9pVZgu1+WONtKaAj5zenyUh94n5svGtUes4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_072514_641632_B8D4757B X-CRM114-Status: GOOD ( 12.42 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.187 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.187 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , Arnd Bergmann , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The ohci-at91 driver uses #ifdef to check for CONFIG_PM, but then uses SIMPLE_DEV_PM_OPS, which leaves the references out when CONFIG_PM_SLEEP is not defined, so we get a warning with PM=y && PM_SLEEP=n: drivers/usb/host/ohci-at91.c:587:1: error: 'ohci_hcd_at91_drv_suspend' defined but not used [-Werror=unused-function] drivers/usb/host/ohci-at91.c:631:12: error: 'ohci_hcd_at91_drv_resume' defined but not used [-Werror=unused-function] This removes the incorrect #ifdef and instead uses a __maybe_unused annotation to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann --- drivers/usb/host/ohci-at91.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 95c8ddde0725..d177372bb357 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -581,9 +581,7 @@ static int ohci_hcd_at91_drv_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM - -static int +static int __maybe_unused ohci_hcd_at91_drv_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); @@ -628,7 +626,8 @@ ohci_hcd_at91_drv_suspend(struct device *dev) return ret; } -static int ohci_hcd_at91_drv_resume(struct device *dev) +static int __maybe_unused +ohci_hcd_at91_drv_resume(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); @@ -641,7 +640,6 @@ static int ohci_hcd_at91_drv_resume(struct device *dev) ohci_resume(hcd, false); return 0; } -#endif static SIMPLE_DEV_PM_OPS(ohci_hcd_at91_pm_ops, ohci_hcd_at91_drv_suspend, ohci_hcd_at91_drv_resume);