public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Ren, Cloud" <cjren@qca.qualcomm.com>
Cc: David Miller <davem@davemloft.net>,
	"Rodriguez, Luis" <rodrigue@qca.qualcomm.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [patch net-next]alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver
Date: Wed, 19 Oct 2011 00:56:06 -0700	[thread overview]
Message-ID: <1319010966.14493.5.camel@Joe-Laptop> (raw)
In-Reply-To: <6349D7A510622448B1BA0967850A8438011CBA5D@nasanexd02d.na.qualcomm.com>

> ----Original Message-----
> From: David Miller [mailto:davem@davemloft.net] 
> From: <cloud.ren@Atheros.com>
> Date: Wed, 19 Oct 2011 15:26:53 +0800
> > +#define HW_PRINT(_klv, _fmt, _args...) \
> > +	if (ALX_HW_MSG_LV_##_klv || ALX_HW_MSG_LV_ALL) {\
> > +		printk(KERN_##_klv ALX_HW_MSG_PFX_NAME "%s: " _fmt, \
> > +			__func__, ## _args); \
> > +	}
> Do not create your own network driver debugging facilities and macros
> for logging messages, we have rich debugging and logging level
> interfaces that network drivers can use exactly for this purpose.

On Wed, 2011-10-19 at 07:44 +0000, Ren, Cloud wrote:
> Ok. What logging interfaces can I use? Are they dev_err, dev_info and
dev_warn ? thanks

Add and use #define pr_fmt

Logging functions/macros are:

pr_<level>(fmt, ...)
dev_<level>(struct device *, fmt, ...)
netdev_<level>(struct net_device *, fmt, ...)
netif_<level>(priv, type, struct net_device *, fmt, ...)

You chose to add __func__ to all of this output.
I don't think that's particularly valuable.

  parent reply	other threads:[~2011-10-19  7:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19  7:26 [patch net-next]alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver cloud.ren
2011-10-19  7:33 ` David Miller
2011-10-19  7:44   ` Ren, Cloud
2011-10-19  7:50     ` David Miller
2011-10-19  7:53       ` Ren, Cloud
2011-10-19  7:56     ` Joe Perches [this message]
2011-10-19 22:21 ` Francois Romieu
2011-10-19 22:59   ` Joe Perches
2011-10-20  7:29   ` Ren, Cloud
2011-10-20  8:48     ` David Miller
2011-10-28  2:56   ` Joe Perches
  -- strict thread matches above, loose matches on Subject: below --
2011-10-20  6:46 cloud.ren
2011-10-20  8:45 ` David Miller
2011-10-20  9:00   ` Joe Perches
2011-10-20  9:23   ` Ren, Cloud
2011-10-20  9:25     ` David Miller
2011-10-20  9:48       ` Ren, Cloud
2011-10-20 20:33         ` Luis R. Rodriguez
2011-10-21  2:21           ` Ren, Cloud
2011-10-21  2:36             ` Luis R. Rodriguez

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=1319010966.14493.5.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=cjren@qca.qualcomm.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rodrigue@qca.qualcomm.com \
    /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