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?
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html