From: Frank Seidel <fseidel@suse.de>
To: linux kernel <linux-kernel@vger.kernel.org>
Cc: akpm@linux-foundation.org, khali@linux-fr.org,
ben-linux@fluff.org, linux-i2c@vger.kernel.org,
frank@f-seidel.de, w.sang@pengutronix.de,
"David S. Miller" <davem@davemloft.net>,
ukleinek@informatik.uni-freiburg.de,
Frans Pop <elendil@planet.nl>,
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
Jean Delvare <khali@linux-fr.org>, Frank Seidel <fseidel@suse.de>
Subject: [PATCHv2 2/2] i2c: adapt debug macros for KERN_* constants
Date: Sun, 08 Feb 2009 15:20:31 +0100 [thread overview]
Message-ID: <498EEA2F.5050601@suse.de> (raw)
In-Reply-To: <498EE9C9.4080002@suse.de>
From: Frank Seidel <frank@f-seidel.de>
According to kerneljanitors todo list all printk calls (beginning
a new line) should have an according KERN_* constant.
Those are the changes to the debug macros in the i2c subsystem
to meet this requirement. Also changing no-debug statements
to raw printks again.
Signed-off-by: Frank Seidel <frank@f-seidel.de>
---
drivers/i2c/algos/i2c-algo-pca.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
--- a/drivers/i2c/algos/i2c-algo-pca.c
+++ b/drivers/i2c/algos/i2c-algo-pca.c
@@ -27,9 +27,12 @@
#include <linux/i2c.h>
#include <linux/i2c-algo-pca.h>
-#define DEB1(fmt, args...) do { if (i2c_debug>=1) printk(fmt, ## args); } while(0)
-#define DEB2(fmt, args...) do { if (i2c_debug>=2) printk(fmt, ## args); } while(0)
-#define DEB3(fmt, args...) do { if (i2c_debug>=3) printk(fmt, ## args); } while(0)
+#define DEB1(fmt, args...) do { if (i2c_debug >= 1) \
+ printk(KERN_DEBUG fmt, ## args); } while (0)
+#define DEB2(fmt, args...) do { if (i2c_debug >= 2) \
+ printk(KERN_DEBUG fmt, ## args); } while (0)
+#define DEB3(fmt, args...) do { if (i2c_debug >= 3) \
+ printk(KERN_DEBUG fmt, ## args); } while (0)
static int i2c_debug;
@@ -313,7 +316,7 @@ static int pca_xfer(struct i2c_adapter *
ret = curmsg;
out:
- DEB1(KERN_CRIT "}}} transfered %d/%d messages. "
+ DEB1("}}} transfered %d/%d messages. "
"status is %#04x. control is %#04x\n",
curmsg, num, pca_status(adap),
pca_get_con(adap));
@@ -347,7 +350,8 @@ static int pca_init(struct i2c_adapter *
pca_reset(pca_data);
clock = pca_clock(pca_data);
- DEB1(KERN_INFO "%s: Clock frequency is %dkHz\n", adap->name, freqs[clock]);
+ printk(KERN_INFO "%s: Clock frequency is %dkHz\n", adap->name,
+ freqs[clock]);
pca_set_con(pca_data, I2C_PCA_CON_ENSIO | clock);
udelay(500); /* 500 us for oscilator to stabilise */
next prev parent reply other threads:[~2009-02-08 14:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-06 13:45 [PATCH] i2c: add missing KERN_* constants to printks Frank Seidel
2009-02-06 18:35 ` Uwe Kleine-König
2009-02-06 19:59 ` Frank Seidel
2009-02-06 20:53 ` Uwe Kleine-König
2009-02-06 21:23 ` Jean Delvare
2009-02-07 10:37 ` Frank Seidel
2009-02-07 10:52 ` Uwe Kleine-König
2009-02-07 15:58 ` Jean Delvare
2009-02-07 23:05 ` Jean Delvare
2009-02-08 13:11 ` Frank Seidel
2009-02-08 13:47 ` Jean Delvare
2009-02-08 14:16 ` Frank Seidel
2009-02-09 8:35 ` Wolfram Sang
2009-02-09 10:27 ` Jean Delvare
2009-02-08 14:18 ` [PATCHv2 1/2] " Frank Seidel
2009-02-08 14:20 ` Frank Seidel [this message]
2009-02-09 15:16 ` [PATCHv2 2/2] i2c: adapt debug macros for KERN_* constants Jean Delvare
2009-02-10 15:16 ` Wolfram Sang
2009-02-21 12:39 ` Wolfram Sang
2009-02-09 12:22 ` [PATCHv2 1/2] i2c: add missing KERN_* constants to printks Jean Delvare
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=498EEA2F.5050601@suse.de \
--to=fseidel@suse.de \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=akpm@linux-foundation.org \
--cc=ben-linux@fluff.org \
--cc=davem@davemloft.net \
--cc=elendil@planet.nl \
--cc=frank@f-seidel.de \
--cc=khali@linux-fr.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ukleinek@informatik.uni-freiburg.de \
--cc=w.sang@pengutronix.de \
/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