From: Joe Perches <joe@perches.com>
To: Auke Kok <auke-jan.h.kok@intel.com>
Cc: netdev@vger.kernel.org, jeff@garzik.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 09:52:01 -0700 [thread overview]
Message-ID: <1181667121.6020.56.camel@localhost> (raw)
In-Reply-To: <20070612004009.1545.12076.stgit@localhost.localdomain>
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)
next prev parent reply other threads:[~2007-06-12 16:52 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 [this message]
2007-06-12 17:11 ` Jeff Garzik
2007-06-12 18:37 ` Kok, Auke
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=1181667121.6020.56.camel@localhost \
--to=joe@perches.com \
--cc=arjan@linux.intel.com \
--cc=auke-jan.h.kok@intel.com \
--cc=davem@davemloft.net \
--cc=jeff@garzik.org \
--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.