All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Joe Perches <joe@perches.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org, netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC patch (against wireless-next)] include/net/cfg80211.h: wiphy_<level> messages use dev_printk
Date: Wed, 25 Aug 2010 14:01:29 -0400	[thread overview]
Message-ID: <20100825180129.GK2557@tuxdriver.com> (raw)
In-Reply-To: <1282342439.1960.84.camel@Joe-Laptop>

On Fri, Aug 20, 2010 at 03:13:59PM -0700, Joe Perches wrote:
> On Thu, 2010-08-19 at 21:39 +0200, Johannes Berg wrote:
> > On Thu, 2010-08-19 at 12:24 -0700, Joe Perches wrote:
> > > Adding device to the wiphy logging messages could be useful.
> > >  #define wiphy_printk(level, wiphy, format, args...)		\
> > > -	printk(level "%s: " format, wiphy_name(wiphy), ##args)
> > > +	dev_printk(level, &wiphy->dev, "%s: " format, wiphy_name(wiphy), ##args)
> > what will that actually print?
> 
> As is, that'd print:
> 
> "<level>dev_driver_string(&wiphy->dev) dev_name(&wiphy->dev): wiphy_name(wiphy): " fmt, ##args
> 
> for instance:
> 
> [   41.261941] ieee80211 phy0: phy0: Selected rate control algorithm 'minstrel_ht'
> 
> ie: redundant.
> wiphy_name(wiphy) is an inline for dev_name(&wiphy->dev)
> 
> So it's appropriate to use:
> 
> #define wiphy_<level>(wiphy, fmt, arg...) dev_<level>(&wiphy->dev, fmt, ##arg) 
> 
> and the output becomes:
> 
> [   41.261941] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Everyone OK w/ this version?

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

  reply	other threads:[~2010-08-25 18:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19 19:24 [RFC patch] include/net/cfg80211.h: wiphy_<level> messages use dev_printk Joe Perches
2010-08-19 19:39 ` Johannes Berg
2010-08-20 22:13   ` [RFC patch (against wireless-next)] " Joe Perches
2010-08-25 18:01     ` John W. Linville [this message]
2010-08-25 18:25       ` Johannes Berg

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=20100825180129.GK2557@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=joe@perches.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.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.