netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Joe Perches <joe@perches.com>
Cc: Auke Kok <auke-jan.h.kok@intel.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 13:11:15 -0400	[thread overview]
Message-ID: <466ED3B3.1080300@garzik.org> (raw)
In-Reply-To: <1181667121.6020.56.camel@localhost>

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.

	Jeff




  reply	other threads:[~2007-06-12 17:11 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 [this message]
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=466ED3B3.1080300@garzik.org \
    --to=jeff@garzik.org \
    --cc=arjan@linux.intel.com \
    --cc=auke-jan.h.kok@intel.com \
    --cc=davem@davemloft.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).