2009-12-30 20:20:47

by Hartley Sweeten

[permalink] [raw]
Subject: [PATCH] drivers/net/stmmac/gmac.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: David S. Miller <[email protected]>
---

diff --git a/drivers/net/stmmac/gmac.c b/drivers/net/stmmac/gmac.c
index 52586ee..7700772 100644
--- a/drivers/net/stmmac/gmac.c
+++ b/drivers/net/stmmac/gmac.c
@@ -481,12 +481,8 @@ static void gmac_set_filter(struct net_device *dev)
gmac_set_umac_addr(ioaddr, uc_ptr->da_addr,
i + 1);

- DBG(KERN_INFO "\t%d "
- "- Unicast addr %02x:%02x:%02x:%02x:%02x:"
- "%02x\n", i + 1,
- uc_ptr->da_addr[0], uc_ptr->da_addr[1],
- uc_ptr->da_addr[2], uc_ptr->da_addr[3],
- uc_ptr->da_addr[4], uc_ptr->da_addr[5]);
+ DBG(KERN_INFO "\t%d - Unicast addr %pM\n",
+ i + 1, uc_ptr->da_addr);
uc_ptr = uc_ptr->next;
}
}


2010-01-05 08:25:44

by Peppe CAVALLARO

[permalink] [raw]
Subject: Re: [PATCH] drivers/net/stmmac/gmac.c: use %pM to show MAC address

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Hartley,

H Hartley Sweeten wrote:
> Use the %pM kernel extension to display the MAC address.

Thanks for this patch.
As discussed in the mailing list, I'm reworking some patches for the
stmmac driver (fixing compilation errors and trying to make the code
more generic).
I've already modified the gmac.c file now splitted in new two files.
So I'm wondering if it's worth applying this patch into the new code,
directly.

Regards,
Peppe

>
> Signed-off-by: H Hartley Sweeten <[email protected]>
> Cc: David S. Miller <[email protected]>
> ---
>
> diff --git a/drivers/net/stmmac/gmac.c b/drivers/net/stmmac/gmac.c
> index 52586ee..7700772 100644
> --- a/drivers/net/stmmac/gmac.c
> +++ b/drivers/net/stmmac/gmac.c
> @@ -481,12 +481,8 @@ static void gmac_set_filter(struct net_device *dev)
> gmac_set_umac_addr(ioaddr, uc_ptr->da_addr,
> i + 1);
>
> - DBG(KERN_INFO "\t%d "
> - "- Unicast addr %02x:%02x:%02x:%02x:%02x:"
> - "%02x\n", i + 1,
> - uc_ptr->da_addr[0], uc_ptr->da_addr[1],
> - uc_ptr->da_addr[2], uc_ptr->da_addr[3],
> - uc_ptr->da_addr[4], uc_ptr->da_addr[5]);
> + DBG(KERN_INFO "\t%d - Unicast addr %pM\n",
> + i + 1, uc_ptr->da_addr);
> uc_ptr = uc_ptr->next;
> }
> }
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAktC8iAACgkQ2Xo3j31MSSJ+DACguvgHAeRm2Qy+N6Lw8svt/nna
Z0sAnRjHHkG+FYtyu0OfjOrRi8eu9SyN
=srnl
-----END PGP SIGNATURE-----

2010-01-05 15:26:44

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH] drivers/net/stmmac/gmac.c: use %pM to show MAC address

On Tuesday, January 05, 2010 1:03 AM, Giuseppe CAVALLARO wrote:
> Hi Hartley,

Hello.

> H Hartley Sweeten wrote:
>> Use the %pM kernel extension to display the MAC address.
>
> Thanks for this patch.
> As discussed in the mailing list, I'm reworking some patches for the
> stmmac driver (fixing compilation errors and trying to make the code
> more generic).
> I've already modified the gmac.c file now splitted in new two files.
> So I'm wondering if it's worth applying this patch into the new code,
> directly.

Feel free to apply this with your new code.

I am resubmitting a number of the %pM patches to David and will drop
this one for now. If you don't get a chance to submit the updated
gmac.c soon please let me know and I will repost this patch.

Thanks,
Hartley