linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/usb: fix build warning
@ 2012-10-08 21:47 Kim Phillips
  2012-10-24 14:01 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 2+ messages in thread
From: Kim Phillips @ 2012-10-08 21:47 UTC (permalink / raw)
  To: linuxppc-dev, linux-usb; +Cc: Shengzhou Liu

commit 3735ba8db8e6ea22ad3ff524328926d8d780a884 "powerpc/usb: fix bug of
CPU hang when missing USB PHY clock" introduced a new build warning:

In file included from linux/drivers/usb/host/ehci-hcd.c:1208:0:
linux/drivers/usb/host/ehci-fsl.c: In function 'ehci_fsl_setup_phy':
linux/drivers/usb/host/ehci-fsl.c:225:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]

this fixes it.

Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
 drivers/usb/host/ehci-fsl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 9bfde82..968f751 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -222,7 +222,7 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
 
 	if (pdata->controller_ver < 0) {
 		dev_warn(hcd->self.controller, "Could not get controller version\n");
-		return;
+		return -EINVAL;
 	}
 
 	portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]);
-- 
1.7.12.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc/usb: fix build warning
  2012-10-08 21:47 [PATCH] powerpc/usb: fix build warning Kim Phillips
@ 2012-10-24 14:01 ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2012-10-24 14:01 UTC (permalink / raw)
  To: Kim Phillips; +Cc: linux-usb, linuxppc-dev, Shengzhou Liu

> index 9bfde82..968f751 100644
> --- a/drivers/usb/host/ehci-fsl.c
> +++ b/drivers/usb/host/ehci-fsl.c
> @@ -222,7 +222,7 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
>  
>  	if (pdata->controller_ver < 0) {
>  		dev_warn(hcd->self.controller, "Could not get controller version\n");
> -		return;
> +		return -EINVAL;
>  	}
>  
>  	portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]);

Another patch (USB: ehci-fsl: Return valid error in ehci_fsl_setup_phy)
by-passed Greg and went via Linus into tree and is available in v3.7-rc2.

Sebastian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-24 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-08 21:47 [PATCH] powerpc/usb: fix build warning Kim Phillips
2012-10-24 14:01 ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).