From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] rfc: print mac addr
Date: Tue, 06 Dec 2005 17:11:48 +0000 [thread overview]
Message-ID: <4395C654.5050307@bfs.de> (raw)
In-Reply-To: <43956CB7.2060904@bfs.de>
Paolo Teti wrote:
> Hi walter
>
>> for (i = 0; i < 6; i++)
>> printk("%2.2x%c", dev->dev_addr[i],i = 5 ? '\n' : ':');
>>
>
> 1. Please post an example or the file name!
cd linux/drivers/net
grep dev_addr *.c | grep printk
>
> 2. Are you sure that this portion of code isn't into a DEBUG block
> (something like #ifdef DEBUG_xx)?
i did not check every file but looked into a few and the pattern is all
the same. maybe some of them are inside a #ifdef debug the few i looked
are not.
i know gregKH added a few dev helper macros but i can not find them
anymore. The idea is to provide a function like:
void print_mac(struct net_device *dev)
{
int i;
printk(KERN_INFO);
for (i = 0; i < MAX_ADDR_LEN; i++)
printk("%2.2x%c", dev->dev_addr[i],i = (MAX_ADDR_LEN-1) ? '\n'
: ':');
}
may you like to return a string ?
re,
walter
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2005-12-06 17:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-06 10:49 [KJ] rfc: print mac addr walter harms
2005-12-06 11:11 ` Paolo Teti
2005-12-06 17:03 ` Randy.Dunlap
2005-12-06 17:11 ` walter harms [this message]
2005-12-06 17:15 ` Roland Dreier
2005-12-07 1:07 ` Randy.Dunlap
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=4395C654.5050307@bfs.de \
--to=wharms@bfs.de \
--cc=kernel-janitors@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 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.