From: Paul Mundt <lethal@linux-sh.org>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
Mathieu Segaud <mathieu.segaud@regala.cx>,
Richard Knutsson <ricknu-0@student.ltu.se>,
linux-pcmcia@lists.infradead.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] [Coding Style]: fs/ext{3,4}/ext{3,4}_jbd{,2}.c
Date: Fri, 11 Jan 2008 20:23:53 +0900 [thread overview]
Message-ID: <20080111112353.GA31938@linux-sh.org> (raw)
In-Reply-To: <47874D2E.2000603@tiscali.nl>
On Fri, Jan 11, 2008 at 12:04:14PM +0100, Roel Kluin wrote:
> Paul Mundt wrote:
> > Take a look at how CONFIG_PCMCIA_DEBUG is handled.
>
> In drivers/pcmcia/Makefile, when CONFIG_PCMCIA_DEBUG=y, it gives
> EXTRA_CFLAGS += -DDEBUG
> which causes the definition of DEBUG as a macro, with definition 1.
>
> > With DEBUG()->pr_debug() conversion here you've silently dropped the
> > __func__ prefixing. Note that dev_dbg() is usually preferred when you can
> > get a hold of a struct device pointer, as it takes care of prettifying
> > the output with the driver name and so on, rather than the convention of
> > adding a prefix. If you can't get at the struct device pointer, you'll
> > probably just want to insert the __func__ prefixing manually at the
> > callsites.
>
> Ah, ok, then this should be right:
> --
> Replace printk wrapper - with a syntax error - by pr_debug.
> DEBUG is defined 1 when CONFIG_PCMCIA_DEBUG is set.
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/drivers/pcmcia/au1000_xxs1500.c b/drivers/pcmcia/au1000_xxs1500.c
> index ce9d5c4..8e6426b 100644
> --- a/drivers/pcmcia/au1000_xxs1500.c
> +++ b/drivers/pcmcia/au1000_xxs1500.c
> @@ -55,12 +55,6 @@
> #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK + 1)
> #define PCMCIA_IRQ AU1000_GPIO_4
>
> -#if 0
> -#define DEBUG(x,args...) printk(__FUNCTION__ ": " x,##args)
> -#else
> -#define DEBUG(x,args...)
> -#endif
> -
> static int xxs1500_pcmcia_init(struct pcmcia_init *init)
> {
> return PCMCIA_NUM_SOCKS;
> @@ -143,13 +137,13 @@ xxs1500_pcmcia_configure_socket(const struct pcmcia_configure *configure)
>
> if(configure->sock > PCMCIA_MAX_SOCK) return -1;
>
> - DEBUG("Vcc %dV Vpp %dV, reset %d\n",
> + pr_debug("Vcc %dV Vpp %dV, reset %d\n",
> configure->vcc, configure->vpp, configure->reset);
>
You're still changing the semantics here. The DEBUG() does __FUNCTION__
prefixing, while pr_debug() does not. This should be something like
pr_debug("%s: ....", __func__, ...); instead, if you want to maintain
consistency. Beyond that, this looks fine, yes.
next prev parent reply other threads:[~2008-01-11 11:24 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 13:21 [PATCH] [Coding Style]: misc fixes for fs/ext{3,4}/acl.{c,h} from checkpatch.pl Mathieu Segaud
2008-01-04 13:21 ` [PATCH] [Coding Style]: fs/ext{3,4}/balloc.c Mathieu Segaud
2008-01-04 13:21 ` [PATCH] [Coding Style]: fs/ext{3,4}/bitmap.c Mathieu Segaud
2008-01-04 13:21 ` [PATCH] [Coding Style]: fs/ext{3,4}/dir.c Mathieu Segaud
2008-01-04 13:21 ` [PATCH] [Coding Style]: fs/ext{3,4}/ext{3,4}_jbd{,2}.c Mathieu Segaud
2008-01-04 13:41 ` Richard Knutsson
2008-01-04 13:47 ` Mathieu SEGAUD
2008-01-05 4:12 ` Andreas Dilger
2008-01-05 4:47 ` Dmitri Vorobiev
2008-01-05 4:48 ` Dmitri Vorobiev
2008-01-05 5:18 ` Al Viro
2008-01-10 21:03 ` Roel Kluin
2008-01-11 3:09 ` Peter Stuge
2008-01-11 3:09 ` Peter Stuge
2008-01-11 3:42 ` Paul Mundt
2008-01-11 3:46 ` Peter Stuge
2008-01-11 3:46 ` Peter Stuge
2008-01-11 9:45 ` Roel Kluin
2008-01-11 9:45 ` Roel Kluin
2008-01-11 10:29 ` Paul Mundt
2008-01-11 11:04 ` Roel Kluin
2008-01-11 11:04 ` Roel Kluin
2008-01-11 11:23 ` Paul Mundt [this message]
2008-01-11 12:27 ` Roel Kluin
2008-01-11 12:27 ` Roel Kluin
2008-01-11 3:42 ` Paul Mundt
2008-01-04 13:44 ` [PATCH] [Coding Style]: misc fixes for fs/ext{3,4}/acl.{c,h} from checkpatch.pl Theodore Tso
2008-01-04 13:49 ` Mathieu SEGAUD
2008-01-04 13:56 ` Theodore Tso
2008-01-04 16:30 ` Andi Kleen
2008-01-04 19:01 ` Theodore Tso
2008-01-04 19:41 ` Andi Kleen
2008-01-04 20:01 ` Cyrill Gorcunov
2008-01-04 20:03 ` Paolo Ciarrocchi
2008-01-04 22:33 ` Andi Kleen
2008-01-05 0:12 ` Paolo Ciarrocchi
2008-01-05 0:39 ` Theodore Tso
2008-01-05 21:24 ` Jan Engelhardt
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=20080111112353.GA31938@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=12o3l@tiscali.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=mathieu.segaud@regala.cx \
--cc=ricknu-0@student.ltu.se \
--cc=viro@ZenIV.linux.org.uk \
/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.