From: Denis Vlasenko <vda.linux@googlemail.com>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: Joe Perches <joe@perches.com>, Greg KH <greg@kroah.com>,
Jesper Juhl <jesper.juhl@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Tiny error in printk output for clocksource : a3:<6>Time: acpi_pm clocksource has been installed.
Date: Thu, 28 Sep 2006 12:56:23 +0200 [thread overview]
Message-ID: <200609281256.23175.vda.linux@googlemail.com> (raw)
In-Reply-To: <20060926221718.7e20613e.rdunlap@xenotime.net>
On Wednesday 27 September 2006 07:17, Randy Dunlap wrote:
> On Tue, 26 Sep 2006 22:10:43 -0700 Joe Perches wrote:
>
> > On Tue, 2006-09-26 at 21:56 -0700, Randy Dunlap wrote:
> > > > Nope, that's part of the NIC's MAC address. It was split up.
> > >
> > > Sorry. In this case, it was via-rhine.c:
> > >
> > > for (i = 0; i < 5; i++)
> > > printk("%2.2x:", dev->dev_addr[i]);
> > > printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], pdev->irq);
> > >
> > > so it does break the printk()s up itself.
> >
> > Changing all of those MAC address printks to a single function
> > could prevent this.
> >
> > http://www.uwsg.iu.edu/hypermail/linux/net/0602.1/0002.html
>
> True enough. Thanks for the patch.
> However, in this case, the single-printed MAC address still needs
> a \n, with the IRQ on a separate line (wasting vertical screen space),
> or it needs a custom printk() that is all done at one time.
Custom print_mac worked very nice for me in acx driver.
In order to accomodate arbitrary text before/after mac addres,
I did it this way:
#define MACSTR "%02X:%02X:%02X:%02X:%02X:%02X"
#define MAC(bytevector) \
((unsigned char *)bytevector)[0], \
((unsigned char *)bytevector)[1], \
((unsigned char *)bytevector)[2], \
((unsigned char *)bytevector)[3], \
((unsigned char *)bytevector)[4], \
((unsigned char *)bytevector)[5]
void print_mac(const char *head, const unsigned char *mac, const char *tail)
{
printk("%s"MACSTR"%s", head, MAC(mac), tail);
}
Usage: print_mac("adev->bssid: ", adev->bssid, "\n");
--
vda
next prev parent reply other threads:[~2006-09-28 11:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-27 0:22 Tiny error in printk output for clocksource : a3:<6>Time: acpi_pm clocksource has been installed Jesper Juhl
2006-09-27 0:33 ` Randy Dunlap
2006-09-27 0:36 ` Jesper Juhl
2006-09-27 0:54 ` Randy Dunlap
2006-09-27 1:15 ` Jesper Juhl
2006-09-27 3:54 ` Randy Dunlap
2006-09-27 4:32 ` Greg KH
2006-09-27 4:52 ` Randy Dunlap
2006-09-27 4:56 ` Randy Dunlap
2006-09-27 5:07 ` Greg KH
2006-09-27 5:10 ` Joe Perches
2006-09-27 5:17 ` Randy Dunlap
2006-09-27 5:19 ` Joe Perches
2006-09-27 15:24 ` Randy Dunlap
2006-09-28 10:56 ` Denis Vlasenko [this message]
2006-09-28 16:08 ` Joe Perches
2006-09-28 16:19 ` Denis Vlasenko
2006-09-28 17:03 ` Joe Perches
2006-09-28 23:26 ` Joe Perches
2006-09-27 21:38 ` Jesper Juhl
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=200609281256.23175.vda.linux@googlemail.com \
--to=vda.linux@googlemail.com \
--cc=greg@kroah.com \
--cc=jesper.juhl@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.