From: Eugene Teo <eugeneteo@kernel.sg>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, David Miller <davem@davemloft.net>
Subject: Re: [PATCH] - Remove current defines and uses of pr_err, add pr_emerg, pr_alert, pr_crit, pr_err, pr_warn, pr_notice to include/linux/kernel.h
Date: Wed, 01 Aug 2007 16:24:40 +0800 [thread overview]
Message-ID: <46B04348.1060907@kernel.sg> (raw)
In-Reply-To: <1185941363.14777.34.camel@localhost>
Hi Joe,
Joe Perches wrote:
> Remove current #define and uses of pr_err
> Add pr_emerg, pr_alert, pr_crit, pr_err, pr_warn, pr_notice
> to include/linux/kernel.h
>
> Signed-off-by: Joe Perches <joe@perches.com>
>
> diff --git a/drivers/i2c/chips/menelaus.c b/drivers/i2c/chips/menelaus.c
> index 48a7e2f..3ee323a 100644
> --- a/drivers/i2c/chips/menelaus.c
> +++ b/drivers/i2c/chips/menelaus.c
> @@ -49,8 +49,7 @@
> #include <asm/arch/menelaus.h>
>
> #define DRIVER_NAME "menelaus"
> -
> -#define pr_err(fmt, arg...) printk(KERN_ERR DRIVER_NAME ": ", ## arg);
Makes sense to remove the duplicated pr_* functions, and have it declared in
include/linux/kernel.h.
> +#define PFX DRIVER_NAME ": "
>
> #define MENELAUS_I2C_ADDRESS 0x72
>
> @@ -156,7 +155,7 @@ static int menelaus_write_reg(int reg, u8 value)
> int val = i2c_smbus_write_byte_data(the_menelaus->client, reg, value);
>
> if (val < 0) {
> - pr_err("write error");
> + printk(KERN_ERR PFX "write error\n");
> return val;
> }
[...]
But why are you replacing the existing pr_*() with printk(KERN_*?
Eugene
next prev parent reply other threads:[~2007-08-01 8:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-01 4:09 [PATCH] - Remove current defines and uses of pr_err, add pr_emerg, pr_alert, pr_crit, pr_err, pr_warn, pr_notice to include/linux/kernel.h Joe Perches
2007-08-01 8:24 ` Eugene Teo [this message]
2007-08-01 14:09 ` Joe Perches
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=46B04348.1060907@kernel.sg \
--to=eugeneteo@kernel.sg \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox