From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Joe Perches <joe@perches.com>,
netdev@vger.kernel.org, davem@davemloft.net,
arjan@linux.intel.com, shemminger@linux-foundation.org,
randy.dunlap@oracle.com
Subject: Re: [PATCH] [RFC -v3] NET: Implement a standard ndev_printk family
Date: Tue, 12 Jun 2007 11:37:26 -0700 [thread overview]
Message-ID: <466EE7E6.40100@intel.com> (raw)
In-Reply-To: <466ED3B3.1080300@garzik.org>
Jeff Garzik wrote:
> Joe Perches wrote:
>> On Mon, 2007-06-11 at 17:40 -0700, Auke Kok wrote:
>>> +#define ndev_err(netdev, level, format, arg...) \
>>> + do { \
>>> + struct net_device *__nd = (netdev); \
>>> + if ((__nd)->msg_enable & NETIF_MSG_##level) \
>>> + printk(KERN_ERR "%s: %s: " format, (__nd)->name, \
>>> + (__nd)->dev.parent->bus_id, ## arg); \
>>> + } while (0)
>>> +
>> I think it's better to remove the macro concatenation/obfuscation
>> of the NETIF_MSG_##level argument and simply pass the appropriate
>> NETIF_MSG_<type> directly to these ndev_<level> calls.
>>
>> It would also simplify the more than 300 calls in drivers/net of
>>
>> if (netif_msg_<type>(ptr))
>> printk(foo)
>>
>> to
>>
>> ndev_<level>(netdev, NETIF_MSG_<type>, fmt, args)
>
> I think this is a whole lot of iteration and effort for a non-problem.
Why do you say that? What is your motivation for that statement? Can you be a
bit more descriptive/constructive?
I have often seen comments on drivers adding new printk's and lots of them
completely ignore the msg_enable bits while advertising that they do thought
some debug/ethtool way. tg3, sky2, r8169, etc... all advertise that they allow
setting/changing msg_enable yet don't actually do _anything_ with the bits.
Only 3 other driver besides the ones I've patched get it right....
How is that a non-problem?
next prev parent reply other threads:[~2007-06-12 18:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-12 0:40 [PATCH] [RFC -v3] NET: Implement a standard ndev_printk family Auke Kok
2007-06-12 16:52 ` Joe Perches
2007-06-12 17:11 ` Jeff Garzik
2007-06-12 18:37 ` Kok, Auke [this message]
2007-06-12 18:38 ` Kok, Auke
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=466EE7E6.40100@intel.com \
--to=auke-jan.h.kok@intel.com \
--cc=arjan@linux.intel.com \
--cc=davem@davemloft.net \
--cc=jeff@garzik.org \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=shemminger@linux-foundation.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.