From: "Michał Mirosław" <mirqus@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Simon Horman <horms@verge.net.au>,
H Hartley Sweeten <hartleys@visionengravers.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] drivers/net/skfp/skfddi.c: use %pMF to show MAC address
Date: Fri, 8 Jan 2010 15:57:23 +0100 [thread overview]
Message-ID: <e2d7436a1001080657r138012d9y1d242e8f3d1568ce@mail.gmail.com> (raw)
In-Reply-To: <1262915005.10429.92.camel@Joe-Laptop.home>
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
next prev parent reply other threads:[~2010-01-08 14:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2010-01-08 0:59 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2d7436a1001080657r138012d9y1d242e8f3d1568ce@mail.gmail.com \
--to=mirqus@gmail.com \
--cc=davem@davemloft.net \
--cc=hartleys@visionengravers.com \
--cc=horms@verge.net.au \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).