* [PATCH] drivers/net/skfp/skfddi.c: use %pMF to show MAC address @ 2010-01-07 23:27 H Hartley Sweeten 2010-01-08 0:02 ` Simon Horman 2010-01-08 0:59 ` David Miller 0 siblings, 2 replies; 6+ messages in thread From: H Hartley Sweeten @ 2010-01-07 23:27 UTC (permalink / raw) To: Linux Kernel, netdev; +Cc: davem Use the %pMF kernel extension to display the MAC address. The address will still be displayed in the FDDI Canonical format. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: David S. Miller <davem@davemloft.net> --- diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index db216a7..1f9698c 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c @@ -435,13 +435,7 @@ static int skfp_driver_init(struct net_device *dev) goto fail; } read_address(smc, NULL); - pr_debug(KERN_INFO "HW-Addr: %02x %02x %02x %02x %02x %02x\n", - smc->hw.fddi_canon_addr.a[0], - smc->hw.fddi_canon_addr.a[1], - smc->hw.fddi_canon_addr.a[2], - smc->hw.fddi_canon_addr.a[3], - smc->hw.fddi_canon_addr.a[4], - smc->hw.fddi_canon_addr.a[5]); + pr_debug(KERN_INFO "HW-Addr: %pMF\n", smc->hw.fddi_canon_addr.a); memcpy(dev->dev_addr, smc->hw.fddi_canon_addr.a, 6); smt_reset_defaults(smc, 0); @@ -890,15 +884,8 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) (struct fddi_addr *)dmi->dmi_addr, 1); - pr_debug(KERN_INFO "ENABLE MC ADDRESS:"); - pr_debug(" %02x %02x %02x ", - dmi->dmi_addr[0], - dmi->dmi_addr[1], - dmi->dmi_addr[2]); - pr_debug("%02x %02x %02x\n", - dmi->dmi_addr[3], - dmi->dmi_addr[4], - dmi->dmi_addr[5]); + pr_debug(KERN_INFO "ENABLE MC ADDRESS: %pMF\n", + dmi->dmi_addr); dmi = dmi->next; } // for ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers/net/skfp/skfddi.c: use %pMF to show MAC address 2010-01-07 23:27 [PATCH] drivers/net/skfp/skfddi.c: use %pMF to show MAC address H Hartley Sweeten @ 2010-01-08 0:02 ` Simon Horman 2010-01-08 1:43 ` Joe Perches 2010-01-08 0:59 ` David Miller 1 sibling, 1 reply; 6+ messages in thread From: Simon Horman @ 2010-01-08 0:02 UTC (permalink / raw) To: H Hartley Sweeten; +Cc: Linux Kernel, netdev, davem On Thu, Jan 07, 2010 at 04:27:46PM -0700, H Hartley Sweeten wrote: > Use the %pMF kernel extension to display the MAC address. > > The address will still be displayed in the FDDI Canonical format. I'm not sure that it matters, but prior to this patch the address was displayed with octets delimited by spaces, and afterwards its delimited by hyphens. So perhaps the comment should read: The address will now be displayed in the FDDI Canonical format. > > Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> > Cc: David S. Miller <davem@davemloft.net> > > --- > > diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c > index db216a7..1f9698c 100644 > --- a/drivers/net/skfp/skfddi.c > +++ b/drivers/net/skfp/skfddi.c > @@ -435,13 +435,7 @@ static int skfp_driver_init(struct net_device *dev) > goto fail; > } > read_address(smc, NULL); > - pr_debug(KERN_INFO "HW-Addr: %02x %02x %02x %02x %02x %02x\n", > - smc->hw.fddi_canon_addr.a[0], > - smc->hw.fddi_canon_addr.a[1], > - smc->hw.fddi_canon_addr.a[2], > - smc->hw.fddi_canon_addr.a[3], > - smc->hw.fddi_canon_addr.a[4], > - smc->hw.fddi_canon_addr.a[5]); > + pr_debug(KERN_INFO "HW-Addr: %pMF\n", smc->hw.fddi_canon_addr.a); > memcpy(dev->dev_addr, smc->hw.fddi_canon_addr.a, 6); > > smt_reset_defaults(smc, 0); > @@ -890,15 +884,8 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) > (struct fddi_addr *)dmi->dmi_addr, > 1); > > - pr_debug(KERN_INFO "ENABLE MC ADDRESS:"); > - pr_debug(" %02x %02x %02x ", > - dmi->dmi_addr[0], > - dmi->dmi_addr[1], > - dmi->dmi_addr[2]); > - pr_debug("%02x %02x %02x\n", > - dmi->dmi_addr[3], > - dmi->dmi_addr[4], > - dmi->dmi_addr[5]); > + pr_debug(KERN_INFO "ENABLE MC ADDRESS: %pMF\n", > + dmi->dmi_addr); > dmi = dmi->next; > } // for > > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers/net/skfp/skfddi.c: use %pMF to show MAC address 2010-01-08 0:02 ` Simon Horman @ 2010-01-08 1:43 ` Joe Perches 2010-01-08 2:52 ` Simon Horman 2010-01-08 14:57 ` Michał Mirosław 0 siblings, 2 replies; 6+ messages in thread From: Joe Perches @ 2010-01-08 1:43 UTC (permalink / raw) To: Simon Horman; +Cc: H Hartley Sweeten, Linux Kernel, netdev, davem On Fri, 2010-01-08 at 11:02 +1100, Simon Horman wrote: > On Thu, Jan 07, 2010 at 04:27:46PM -0700, H Hartley Sweeten wrote: > > Use the %pMF kernel extension to display the MAC address. > > The address will still be displayed in the FDDI Canonical format. > I'm not sure that it matters, but prior to this patch > the address was displayed with octets delimited by spaces, > and afterwards its delimited by hyphens. So perhaps the comment > should read: > > The address will now be displayed in the FDDI Canonical format. And it probably wasn't bit reversed. > > diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c > > index db216a7..1f9698c 100644 > > --- a/drivers/net/skfp/skfddi.c > > +++ b/drivers/net/skfp/skfddi.c > > @@ -435,13 +435,7 @@ static int skfp_driver_init(struct net_device *dev) > > goto fail; > > } > > read_address(smc, NULL); > > - pr_debug(KERN_INFO "HW-Addr: %02x %02x %02x %02x %02x %02x\n", > > - smc->hw.fddi_canon_addr.a[0], > > - smc->hw.fddi_canon_addr.a[1], > > - smc->hw.fddi_canon_addr.a[2], > > - smc->hw.fddi_canon_addr.a[3], > > - smc->hw.fddi_canon_addr.a[4], > > - smc->hw.fddi_canon_addr.a[5]); > > + pr_debug(KERN_INFO "HW-Addr: %pMF\n", smc->hw.fddi_canon_addr.a); Is fddi_canon_addr already bit reversed? It's memcpy'd to dev->dev_addr later, so probably not. > > smt_reset_defaults(smc, 0); > > @@ -890,15 +884,8 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) > > (struct fddi_addr *)dmi->dmi_addr, > > 1); > > > > - pr_debug(KERN_INFO "ENABLE MC ADDRESS:"); > > - pr_debug(" %02x %02x %02x ", > > - dmi->dmi_addr[0], > > - dmi->dmi_addr[1], > > - dmi->dmi_addr[2]); > > - pr_debug("%02x %02x %02x\n", > > - dmi->dmi_addr[3], > > - dmi->dmi_addr[4], > > - dmi->dmi_addr[5]); > > + pr_debug(KERN_INFO "ENABLE MC ADDRESS: %pMF\n", > > + dmi->dmi_addr); I think you want %pM here, not the bit-reversed %pMF form. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers/net/skfp/skfddi.c: use %pMF to show MAC address 2010-01-08 1:43 ` Joe Perches @ 2010-01-08 2:52 ` Simon Horman 2010-01-08 14:57 ` Michał Mirosław 1 sibling, 0 replies; 6+ messages in thread From: Simon Horman @ 2010-01-08 2:52 UTC (permalink / raw) To: Joe Perches; +Cc: H Hartley Sweeten, Linux Kernel, netdev, davem On Thu, Jan 07, 2010 at 05:43:25PM -0800, Joe Perches wrote: > On Fri, 2010-01-08 at 11:02 +1100, Simon Horman wrote: > > On Thu, Jan 07, 2010 at 04:27:46PM -0700, H Hartley Sweeten wrote: > > > Use the %pMF kernel extension to display the MAC address. > > > The address will still be displayed in the FDDI Canonical format. > > > I'm not sure that it matters, but prior to this patch > > the address was displayed with octets delimited by spaces, > > and afterwards its delimited by hyphens. So perhaps the comment > > should read: > > > > The address will now be displayed in the FDDI Canonical format. > > And it probably wasn't bit reversed. > > > > diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c > > > index db216a7..1f9698c 100644 > > > --- a/drivers/net/skfp/skfddi.c > > > +++ b/drivers/net/skfp/skfddi.c > > > @@ -435,13 +435,7 @@ static int skfp_driver_init(struct net_device *dev) > > > goto fail; > > > } > > > read_address(smc, NULL); > > > - pr_debug(KERN_INFO "HW-Addr: %02x %02x %02x %02x %02x %02x\n", > > > - smc->hw.fddi_canon_addr.a[0], > > > - smc->hw.fddi_canon_addr.a[1], > > > - smc->hw.fddi_canon_addr.a[2], > > > - smc->hw.fddi_canon_addr.a[3], > > > - smc->hw.fddi_canon_addr.a[4], > > > - smc->hw.fddi_canon_addr.a[5]); > > > + pr_debug(KERN_INFO "HW-Addr: %pMF\n", smc->hw.fddi_canon_addr.a); > > Is fddi_canon_addr already bit reversed? > It's memcpy'd to dev->dev_addr later, so probably not. > > > > smt_reset_defaults(smc, 0); > > > @@ -890,15 +884,8 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) > > > (struct fddi_addr *)dmi->dmi_addr, > > > 1); > > > > > > - pr_debug(KERN_INFO "ENABLE MC ADDRESS:"); > > > - pr_debug(" %02x %02x %02x ", > > > - dmi->dmi_addr[0], > > > - dmi->dmi_addr[1], > > > - dmi->dmi_addr[2]); > > > - pr_debug("%02x %02x %02x\n", > > > - dmi->dmi_addr[3], > > > - dmi->dmi_addr[4], > > > - dmi->dmi_addr[5]); > > > + pr_debug(KERN_INFO "ENABLE MC ADDRESS: %pMF\n", > > > + dmi->dmi_addr); > > I think you want %pM here, not the bit-reversed %pMF form. > Keeping in mind that %pM uses ':' as the delimiter and %pMF uses '-', which by all accounts is not the FDDI canonical format. But then again, neither is the current use of ' ' as the delimiter. ... seems like there is some discussion surrounding the other patch in the series and what the format and bit-order should be. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers/net/skfp/skfddi.c: use %pMF to show MAC address 2010-01-08 1:43 ` Joe Perches 2010-01-08 2:52 ` Simon Horman @ 2010-01-08 14:57 ` Michał Mirosław 1 sibling, 0 replies; 6+ messages in thread From: Michał Mirosław @ 2010-01-08 14:57 UTC (permalink / raw) To: Joe Perches; +Cc: Simon Horman, H Hartley Sweeten, Linux Kernel, netdev, davem 2010/1/8 Joe Perches <joe@perches.com>: > On Fri, 2010-01-08 at 11:02 +1100, Simon Horman wrote: >> On Thu, Jan 07, 2010 at 04:27:46PM -0700, H Hartley Sweeten wrote: >> > Use the %pMF kernel extension to display the MAC address. >> > The address will still be displayed in the FDDI Canonical format. >> I'm not sure that it matters, but prior to this patch >> the address was displayed with octets delimited by spaces, >> and afterwards its delimited by hyphens. So perhaps the comment >> should read: >> >> The address will now be displayed in the FDDI Canonical format. > And it probably wasn't bit reversed. >> > diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c >> > index db216a7..1f9698c 100644 >> > --- a/drivers/net/skfp/skfddi.c >> > +++ b/drivers/net/skfp/skfddi.c >> > @@ -435,13 +435,7 @@ static int skfp_driver_init(struct net_device *dev) >> > goto fail; >> > } >> > read_address(smc, NULL); >> > - pr_debug(KERN_INFO "HW-Addr: %02x %02x %02x %02x %02x %02x\n", >> > - smc->hw.fddi_canon_addr.a[0], >> > - smc->hw.fddi_canon_addr.a[1], >> > - smc->hw.fddi_canon_addr.a[2], >> > - smc->hw.fddi_canon_addr.a[3], >> > - smc->hw.fddi_canon_addr.a[4], >> > - smc->hw.fddi_canon_addr.a[5]); >> > + pr_debug(KERN_INFO "HW-Addr: %pMF\n", smc->hw.fddi_canon_addr.a); > Is fddi_canon_addr already bit reversed? > It's memcpy'd to dev->dev_addr later, so probably not. > >> > smt_reset_defaults(smc, 0); >> > @@ -890,15 +884,8 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) >> > (struct fddi_addr *)dmi->dmi_addr, >> > 1); >> > >> > - pr_debug(KERN_INFO "ENABLE MC ADDRESS:"); >> > - pr_debug(" %02x %02x %02x ", >> > - dmi->dmi_addr[0], >> > - dmi->dmi_addr[1], >> > - dmi->dmi_addr[2]); >> > - pr_debug("%02x %02x %02x\n", >> > - dmi->dmi_addr[3], >> > - dmi->dmi_addr[4], >> > - dmi->dmi_addr[5]); >> > + pr_debug(KERN_INFO "ENABLE MC ADDRESS: %pMF\n", >> > + dmi->dmi_addr); > I think you want %pM here, not the bit-reversed %pMF form. You could add %pMf for those, that are bit-reversed already? That should take at most two extra insns for x86. ;) Best Regards, Michał Mirosław ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers/net/skfp/skfddi.c: use %pMF to show MAC address 2010-01-07 23:27 [PATCH] drivers/net/skfp/skfddi.c: use %pMF to show MAC address H Hartley Sweeten 2010-01-08 0:02 ` Simon Horman @ 2010-01-08 0:59 ` David Miller 1 sibling, 0 replies; 6+ messages in thread From: David Miller @ 2010-01-08 0:59 UTC (permalink / raw) To: hartleys; +Cc: linux-kernel, netdev From: H Hartley Sweeten <hartleys@visionengravers.com> Date: Thu, 7 Jan 2010 16:27:46 -0700 > Use the %pMF kernel extension to display the MAC address. > > The address will still be displayed in the FDDI Canonical format. > > Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Applied. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-08 14:57 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-01-07 23:27 [PATCH] drivers/net/skfp/skfddi.c: use %pMF to show MAC address H Hartley Sweeten 2010-01-08 0:02 ` Simon Horman 2010-01-08 1:43 ` Joe Perches 2010-01-08 2:52 ` Simon Horman 2010-01-08 14:57 ` Michał Mirosław 2010-01-08 0:59 ` David Miller
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).