linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>,
	"George Kashperko" <george@znau.edu.ua>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Russell King" <rmk@arm.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	b43-dev@lists.infradead.org, "Michael Büsch" <mb@bu3sch.de>,
	linuxdriverproject <devel@linuxdriverproject.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Larry Finger" <Larry.Finger@lwfinger.net>
Subject: Re: [RFC][WAS:bcmai][PATCH V2] axi: add AXI bus driver
Date: Fri, 08 Apr 2011 17:07:43 -0700	[thread overview]
Message-ID: <1302307663.1664.19.camel@Joe-Laptop> (raw)
In-Reply-To: <BANLkTimQBAHgFaH0RVCOYBGSKuHN2Dprmw@mail.gmail.com>

On Sat, 2011-04-09 at 02:03 +0200, Rafał Miłecki wrote:
> 2011/4/8 Joe Perches <joe@perches.com>:
> > On Fri, 2011-04-08 at 21:46 +0200, Rafał Miłecki wrote:
> >> 2011/4/8 Joe Perches <joe@perches.com>:
> >> > On Fri, 2011-04-08 at 21:45 +0200, Rafał Miłecki wrote:
> >> >> diff --git a/include/linux/axi/axi.h b/include/linux/axi/axi.h
> >> > []
> >> >> +#define axi_info     pr_info
> >> >> +#ifdef CONFIG_AXI_DEBUG
> >> >> +#define axi_debug    pr_debug
> >> >> +#else
> >> >> +#define axi_debug    do { } while (0)
> >> >> +#endif
> >> >> +#define axi_err              pr_err
> >> > I think redefining standard functionality like
> >> > this doesn't gain anything and loses some basic
> >> > grep capability.
> >> But on the other hand using:
> >> pr_info, pr_err, BUT axi_debug
> >> can easily lead to mistakes.
> >> Or is this possible to re-define pr_debug locally?
> > It is, but is that CONFIG_AXI_DEBUG actually
> > worthwhile?
> > If you think so, doesn't adding this to the Makefile
> > give you the same capability?
> > ccflags-$(CONFIG_CONFIG_AXI_DEBUG) := -DDEBUG

Just CONFIG_AXI_DEBUG of course.

> But pr_debug does not depend on DEBUG define:
> http://lxr.free-electrons.com/source/tools/perf/util/include/linux/kernel.h#L94
> How do you expect -DDEBUG to affect pr_debug? Could you explain this
> to me, please?

Sure.  You're not looking at the right place.

Look instead at include/linux/printk.h

/* If you are writing a driver, please use dev_dbg instead */
#if defined(DEBUG)
#define pr_debug(fmt, ...) \
	printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#elif defined(CONFIG_DYNAMIC_DEBUG)
/* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
#define pr_debug(fmt, ...) \
	dynamic_pr_debug(fmt, ##__VA_ARGS__)
#else
#define pr_debug(fmt, ...) \
	no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#endif

cheers, Joe


  reply	other threads:[~2011-04-09  0:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 19:45 [RFC][WAS:bcmai][PATCH V2] axi: add AXI bus driver Rafał Miłecki
2011-04-08 19:28 ` Joe Perches
2011-04-08 19:46   ` Rafał Miłecki
2011-04-08 19:55     ` Joe Perches
2011-04-09  0:03       ` Rafał Miłecki
2011-04-09  0:07         ` Joe Perches [this message]
2011-04-08 20:00 ` Gábor Stefanik
2011-04-08 22:01 ` Greg KH
2011-04-08 23:46   ` Rafał Miłecki
2011-04-10 15:52   ` Rafał Miłecki
2011-04-10 16:20     ` Greg KH
2011-04-11 16:59 ` Arend van Spriel
2011-04-11 17:24   ` Rafał Miłecki

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=1302307663.1664.19.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=arnd@arndb.de \
    --cc=b43-dev@lists.infradead.org \
    --cc=devel@linuxdriverproject.org \
    --cc=george@znau.edu.ua \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    --cc=rmk@arm.linux.org.uk \
    --cc=zajec5@gmail.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;
as well as URLs for NNTP newsgroup(s).