From patchwork Thu Mar 28 21:09:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2359591 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 2CBB53FDDA for ; Thu, 28 Mar 2013 21:12:58 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ULK5G-0001r9-C0; Thu, 28 Mar 2013 21:10:06 +0000 Received: from moutng.kundenserver.de ([212.227.126.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ULK5C-0001qa-Fn for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2013 21:10:03 +0000 Received: from klappe2.localnet (HSI-KBW-46-223-90-92.hsi.kabel-badenwuerttemberg.de [46.223.90.92]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MCuUJ-1UUujc2CGZ-009CEt; Thu, 28 Mar 2013 22:09:51 +0100 From: Arnd Bergmann To: Tony Prisk Subject: [PATCH] usb: ehci: mark unlink_empty_async_suspended() as __maybe_unused Date: Thu, 28 Mar 2013 21:09:46 +0000 User-Agent: KMail/1.12.2 (Linux/3.8.0-13-generic; KDE/4.3.2; x86_64; ; ) References: <1364362080-8489-1-git-send-email-linux@prisktech.co.nz> In-Reply-To: <1364362080-8489-1-git-send-email-linux@prisktech.co.nz> MIME-Version: 1.0 Message-Id: <201303282109.47130.arnd@arndb.de> X-Provags-ID: V02:K0:ctAxc6qwwbd1TVqJ8RU9cICUvNqw/1AIEkq98mVJ6sC fhqpOKyNDHwTRHeH4RBq8OBWs5cT1TAUG9mOGXB0+NAYtnJaxh RgVTlNSLbYCSMZZ8bneBk+PchnCgJnS9sdJAvNRKWGeUPJ2Fxs DncefPfxVzh5uf5+1exsNmMHavlgKah4NBj5i6O/QqF5p47BE+ zRV4KunCdIEJJhNcFsQTX20RhDcTQxnmS4Edm00JiFzJBoJKiQ B3hbn+YBM5cWTMfRdH4kpeZxpF5aLy6jBMbHcn/iNQw8MeECh7 TEziOYxL+1WLJI8O/kL840/8axKgMxQigpAnqbVaYE/4Jj4nX/ 0N+zZzgfstrD1+s8FXhM= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130328_171002_905809_0E50519C X-CRM114-Status: GOOD ( 10.65 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.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.171 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, stern@rowland.harvard.edu, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Patch 4d053fdac3 "usb: ehci: unlink_empty_async_suspended() only used with CONFIG_PM" tried to hide the unlink_empty_async_suspended function inside of an #ifdef to work around an unused function warning. Unfortunately that had the effect of introducing a new warning: drivers/usb/host/ehci-q.c:1297:13: warning: 'unlink_empty_async_suspended' declared 'static' but never defined [-Wunused-function] While we could add another #ifdef around the function declaration to avoid this, a nicer solution is to mark it as __maybe_unused, which will let gcc silently drop the function definition when it is not needed. Signed-off-by: Arnd Bergmann Acked-by: Alan Stern diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 7562d76..d34b399 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c @@ -1293,9 +1293,8 @@ static void unlink_empty_async(struct ehci_hcd *ehci) } } -#ifdef CONFIG_PM /* The root hub is suspended; unlink all the async QHs */ -static void unlink_empty_async_suspended(struct ehci_hcd *ehci) +static void __maybe_unused unlink_empty_async_suspended(struct ehci_hcd *ehci) { struct ehci_qh *qh; @@ -1306,7 +1305,6 @@ static void unlink_empty_async_suspended(struct ehci_hcd *ehci) } start_iaa_cycle(ehci); } -#endif /* makes sure the async qh will become idle */ /* caller must own ehci->lock */