public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] drivers:usb:fsl: Return if USB_MAX_CONTROLLER_COUNT is incorrect
@ 2015-05-12  9:28 Nikhil Badola
  2015-06-05  4:19 ` Badola Nikhil
  0 siblings, 1 reply; 4+ messages in thread
From: Nikhil Badola @ 2015-05-12  9:28 UTC (permalink / raw)
  To: u-boot

Return if USB_MAX_CONTROLLER_COUNT hence the index of the controller
to be initialised is incorrect

Signed-off-by: Nikhil Badola <nikhil.badola@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 ed83eb4..1973e0b 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -76,7 +76,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
 		break;
 	default:
 		printf("ERROR: wrong controller index!!\n");
-		break;
+		return -1;
 	};
 
 	*hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
-- 
1.7.11.7

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

* [U-Boot] [PATCH] drivers:usb:fsl: Return if USB_MAX_CONTROLLER_COUNT is incorrect
  2015-05-12  9:28 [U-Boot] [PATCH] drivers:usb:fsl: Return if USB_MAX_CONTROLLER_COUNT is incorrect Nikhil Badola
@ 2015-06-05  4:19 ` Badola Nikhil
  2015-06-05 14:08   ` Marek Vasut
  0 siblings, 1 reply; 4+ messages in thread
From: Badola Nikhil @ 2015-06-05  4:19 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: Nikhil Badola [mailto:nikhil.badola at freescale.com]
> Sent: Tuesday, May 12, 2015 2:58 PM
> To: u-boot at lists.denx.de
> Cc: Badola Nikhil-B46172
> Subject: [PATCH] drivers:usb:fsl: Return if USB_MAX_CONTROLLER_COUNT
> is incorrect
> 
> Return if USB_MAX_CONTROLLER_COUNT hence the index of the controller
> to be initialised is incorrect
> 
> Signed-off-by: Nikhil Badola <nikhil.badola@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
> ed83eb4..1973e0b 100644
> --- a/drivers/usb/host/ehci-fsl.c
> +++ b/drivers/usb/host/ehci-fsl.c
> @@ -76,7 +76,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
>  		break;
>  	default:
>  		printf("ERROR: wrong controller index!!\n");
> -		break;
> +		return -1;
>  	};
> 
>  	*hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
> --
> 1.7.11.7
> 

CCing Marek Vasut..

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

* [U-Boot] [PATCH] drivers:usb:fsl: Return if USB_MAX_CONTROLLER_COUNT is incorrect
  2015-06-05  4:19 ` Badola Nikhil
@ 2015-06-05 14:08   ` Marek Vasut
  2015-06-07  6:51     ` Badola Nikhil
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2015-06-05 14:08 UTC (permalink / raw)
  To: u-boot

On Friday, June 05, 2015 at 06:19:16 AM, Badola Nikhil wrote:
> > -----Original Message-----
> > From: Nikhil Badola [mailto:nikhil.badola at freescale.com]
> > Sent: Tuesday, May 12, 2015 2:58 PM
> > To: u-boot at lists.denx.de
> > Cc: Badola Nikhil-B46172
> > Subject: [PATCH] drivers:usb:fsl: Return if USB_MAX_CONTROLLER_COUNT

Hi,

please do me a favor next time -- insert a space after each tag,
ie. drivers: usb: fsl: ....

> > is incorrect
> > 
> > Return if USB_MAX_CONTROLLER_COUNT hence the index of the controller
> > to be initialised is incorrect
> > 
> > Signed-off-by: Nikhil Badola <nikhil.badola@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 ed83eb4..1973e0b 100644
> > --- a/drivers/usb/host/ehci-fsl.c
> > +++ b/drivers/usb/host/ehci-fsl.c
> > @@ -76,7 +76,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
> > 
> >  		break;
> >  	
> >  	default:
> >  		printf("ERROR: wrong controller index!!\n");
> > 
> > -		break;
> > +		return -1;

Can you please use value from errno.h here , like -EINVAL ?

Thanks!

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH] drivers:usb:fsl: Return if USB_MAX_CONTROLLER_COUNT is incorrect
  2015-06-05 14:08   ` Marek Vasut
@ 2015-06-07  6:51     ` Badola Nikhil
  0 siblings, 0 replies; 4+ messages in thread
From: Badola Nikhil @ 2015-06-07  6:51 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: Marek Vasut [mailto:marex at denx.de]
> Sent: Friday, June 05, 2015 7:38 PM
> To: Badola Nikhil-B46172
> Cc: u-boot at lists.denx.de
> Subject: Re: [PATCH] drivers:usb:fsl: Return if
> USB_MAX_CONTROLLER_COUNT is incorrect
> 
> On Friday, June 05, 2015 at 06:19:16 AM, Badola Nikhil wrote:
> > > -----Original Message-----
> > > From: Nikhil Badola [mailto:nikhil.badola at freescale.com]
> > > Sent: Tuesday, May 12, 2015 2:58 PM
> > > To: u-boot at lists.denx.de
> > > Cc: Badola Nikhil-B46172
> > > Subject: [PATCH] drivers:usb:fsl: Return if
> USB_MAX_CONTROLLER_COUNT
> 
> Hi,
> 
> please do me a favor next time -- insert a space after each tag, ie. drivers:
> usb: fsl: ....
>
Will take of this from next time.
 
> > > is incorrect
> > >
> > > Return if USB_MAX_CONTROLLER_COUNT hence the index of the
> controller
> > > to be initialised is incorrect
> > >
> > > Signed-off-by: Nikhil Badola <nikhil.badola@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 ed83eb4..1973e0b 100644
> > > --- a/drivers/usb/host/ehci-fsl.c
> > > +++ b/drivers/usb/host/ehci-fsl.c
> > > @@ -76,7 +76,7 @@ int ehci_hcd_init(int index, enum usb_init_type
> > > init,
> > >
> > >  		break;
> > >
> > >  	default:
> > >  		printf("ERROR: wrong controller index!!\n");
> > >
> > > -		break;
> > > +		return -1;
> 
> Can you please use value from errno.h here , like -EINVAL ?
> 
Will replace -1 with -EINVAL in next patch version

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

end of thread, other threads:[~2015-06-07  6:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-12  9:28 [U-Boot] [PATCH] drivers:usb:fsl: Return if USB_MAX_CONTROLLER_COUNT is incorrect Nikhil Badola
2015-06-05  4:19 ` Badola Nikhil
2015-06-05 14:08   ` Marek Vasut
2015-06-07  6:51     ` Badola Nikhil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox