Patchwork [U-Boot,3/3] smsc95xx: remove an unecessary debug messages

login
register
mail settings
Submitter Wolfgang Grandegger
Date Nov. 11, 2011, 10:59 a.m.
Message ID <1321009198-20695-4-git-send-email-wg@denx.de>
Download mbox | patch
Permalink /patch/125145/
State Superseded
Headers show

Comments

Wolfgang Grandegger - Nov. 11, 2011, 10:59 a.m.
Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Cc: Simon Glass <sjg@chromium.org>
---
 drivers/usb/eth/smsc95xx.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
Simon Glass - Nov. 11, 2011, 3:26 p.m.
Hi Wolfgang,

On Fri, Nov 11, 2011 at 2:59 AM, Wolfgang Grandegger <wg@denx.de> wrote:
> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> ---
>  drivers/usb/eth/smsc95xx.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
> index 16e24bd..40f7f5b 100644
> --- a/drivers/usb/eth/smsc95xx.c
> +++ b/drivers/usb/eth/smsc95xx.c
> @@ -380,15 +380,14 @@ static int smsc95xx_write_hwaddr(struct eth_device *eth)
>        /* set hardware address */
>        debug("** %s()\n", __func__);
>
> -       ret = smsc95xx_write_reg(dev, ADDRL, addr_lo);
> -       if (ret < 0) {
> -               debug("Failed to write ADDRL: %d\n", ret);
> +       ret = smsc95xx_write_reg(dev, ADDRL, adddr_lo);

addr_lo?

> +       if (ret < 0)
>                return ret;
> -       }
>
>        ret = smsc95xx_write_reg(dev, ADDRH, addr_hi);
>        if (ret < 0)
>                return ret;
> +

Since you are adding a blank line here, you need to fix the line below
:-) See Mike's email...

>        debug("MAC %02x:%02x:%02x:%02x:%02x:%02x\n",
>                eth->enetaddr[0], eth->enetaddr[1],
>                eth->enetaddr[2], eth->enetaddr[3],
> --
> 1.7.4.1
>
>

Regards,
Simon
Wolfgang Grandegger - Nov. 14, 2011, 8:33 a.m.
On 11/11/2011 04:26 PM, Simon Glass wrote:
> Hi Wolfgang,
> 
> On Fri, Nov 11, 2011 at 2:59 AM, Wolfgang Grandegger <wg@denx.de> wrote:
>> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
>> Cc: Simon Glass <sjg@chromium.org>
>> ---
>>  drivers/usb/eth/smsc95xx.c |    7 +++----
>>  1 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
>> index 16e24bd..40f7f5b 100644
>> --- a/drivers/usb/eth/smsc95xx.c
>> +++ b/drivers/usb/eth/smsc95xx.c
>> @@ -380,15 +380,14 @@ static int smsc95xx_write_hwaddr(struct eth_device *eth)
>>        /* set hardware address */
>>        debug("** %s()\n", __func__);
>>
>> -       ret = smsc95xx_write_reg(dev, ADDRL, addr_lo);
>> -       if (ret < 0) {
>> -               debug("Failed to write ADDRL: %d\n", ret);
>> +       ret = smsc95xx_write_reg(dev, ADDRL, adddr_lo);
> 
> addr_lo?

Oh yeah, sneaked in somehow, sorry ... I'm now focusing on Mike's patch
fixing the same issue. Hope to have some feedback later today.

Wolfgang.

Patch

diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index 16e24bd..40f7f5b 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -380,15 +380,14 @@  static int smsc95xx_write_hwaddr(struct eth_device *eth)
 	/* set hardware address */
 	debug("** %s()\n", __func__);
 
-	ret = smsc95xx_write_reg(dev, ADDRL, addr_lo);
-	if (ret < 0) {
-		debug("Failed to write ADDRL: %d\n", ret);
+	ret = smsc95xx_write_reg(dev, ADDRL, adddr_lo);
+	if (ret < 0)
 		return ret;
-	}
 
 	ret = smsc95xx_write_reg(dev, ADDRH, addr_hi);
 	if (ret < 0)
 		return ret;
+
 	debug("MAC %02x:%02x:%02x:%02x:%02x:%02x\n",
 		eth->enetaddr[0], eth->enetaddr[1],
 		eth->enetaddr[2], eth->enetaddr[3],