Patchwork [U-Boot] usb: ehci: don't print debug output

login
register
mail settings
Submitter Lucas Stach
Date Aug. 30, 2012, 3:38 p.m.
Message ID <1346341136-12802-1-git-send-email-dev@lynxeye.de>
Download mbox | patch
Permalink /patch/180827/
State Superseded
Delegated to: Marek Vasut
Headers show

Comments

Lucas Stach - Aug. 30, 2012, 3:38 p.m.
This is clearly some sort of debug output and should not
be printed during normal operation.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 drivers/usb/host/ehci-hcd.c | 2 +-
 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
Marek Vasut - Aug. 30, 2012, 3:47 p.m.
Dear Lucas Stach,

> This is clearly some sort of debug output and should not
> be printed during normal operation.
> 
> Signed-off-by: Lucas Stach <dev@lynxeye.de>

I think we should apply this ... yet it's been in uboot for so long, so I'd like 
to hear other people opinion :)

> ---
>  drivers/usb/host/ehci-hcd.c | 2 +-
>  1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
> 
> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> index 2f4fa5e..eb9e323 100644
> --- a/drivers/usb/host/ehci-hcd.c
> +++ b/drivers/usb/host/ehci-hcd.c
> @@ -863,7 +863,7 @@ int usb_lowlevel_init(void)
> 
>  	reg = ehci_readl(&hccr->cr_hcsparams);
>  	descriptor.hub.bNbrPorts = HCS_N_PORTS(reg);
> -	printf("Register %x NbrPorts %d\n", reg, descriptor.hub.bNbrPorts);
> +	debug("Register %x NbrPorts %d\n", reg, descriptor.hub.bNbrPorts);
>  	/* Port Indicators */
>  	if (HCS_INDICATOR(reg))
>  		descriptor.hub.wHubCharacteristics |= 0x80;

Best regards,
Marek Vasut
Lucas Stach - Sept. 27, 2012, 8:02 p.m.
Hi Marek,

Am Donnerstag, den 30.08.2012, 17:47 +0200 schrieb Marek Vasut:
> Dear Lucas Stach,
> 
> > This is clearly some sort of debug output and should not
> > be printed during normal operation.
> > 
> > Signed-off-by: Lucas Stach <dev@lynxeye.de>
> 
> I think we should apply this ... yet it's been in uboot for so long, so I'd like 
> to hear other people opinion :)
> 
Any updates on this one? Seems nobody really cares and it uglyfies
output in the multi controller case a lot, so I really wish to see this
gone.

> > ---
> >  drivers/usb/host/ehci-hcd.c | 2 +-
> >  1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
> > 
> > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> > index 2f4fa5e..eb9e323 100644
> > --- a/drivers/usb/host/ehci-hcd.c
> > +++ b/drivers/usb/host/ehci-hcd.c
> > @@ -863,7 +863,7 @@ int usb_lowlevel_init(void)
> > 
> >  	reg = ehci_readl(&hccr->cr_hcsparams);
> >  	descriptor.hub.bNbrPorts = HCS_N_PORTS(reg);
> > -	printf("Register %x NbrPorts %d\n", reg, descriptor.hub.bNbrPorts);
> > +	debug("Register %x NbrPorts %d\n", reg, descriptor.hub.bNbrPorts);
> >  	/* Port Indicators */
> >  	if (HCS_INDICATOR(reg))
> >  		descriptor.hub.wHubCharacteristics |= 0x80;
> 
> Best regards,
> Marek Vasut
> 
Thanks,
Lucas

Patch

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 2f4fa5e..eb9e323 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -863,7 +863,7 @@  int usb_lowlevel_init(void)
 
 	reg = ehci_readl(&hccr->cr_hcsparams);
 	descriptor.hub.bNbrPorts = HCS_N_PORTS(reg);
-	printf("Register %x NbrPorts %d\n", reg, descriptor.hub.bNbrPorts);
+	debug("Register %x NbrPorts %d\n", reg, descriptor.hub.bNbrPorts);
 	/* Port Indicators */
 	if (HCS_INDICATOR(reg))
 		descriptor.hub.wHubCharacteristics |= 0x80;