linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	fseidel@suse.de
Subject: [PATCHv2 1/2] i2c: add missing KERN_* constants to printks
Date: Sun, 08 Feb 2009 15:18:49 +0100	[thread overview]
Message-ID: <498EE9C9.4080002@suse.de> (raw)
In-Reply-To: <498C3EEA.5060508@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 missing pieces here for the i2c subsystem.

Signed-off-by: Frank Seidel <frank@f-seidel.de>
---
 drivers/i2c/algos/i2c-algo-pcf.c  |    2 +-
 drivers/i2c/busses/i2c-pca-isa.c  |    5 +++--
 drivers/i2c/busses/i2c-powermac.c |    3 ++-
 drivers/i2c/busses/i2c-pxa.c      |    9 +++++----
 4 files changed, 11 insertions(+), 8 deletions(-)

--- linux-2.6.orig/drivers/i2c/algos/i2c-algo-pcf.c
+++ linux-2.6/drivers/i2c/algos/i2c-algo-pcf.c
@@ -61,7 +61,7 @@ static int i2c_debug;
 
 static void i2c_start(struct i2c_algo_pcf_data *adap) 
 {
-	DEBPROTO(printk("S "));
+	DEBPROTO(printk(KERN_DEBUG "S "));
 	set_pcf(adap, 1, I2C_PCF_START);
 }
 
--- linux-2.6.orig/drivers/i2c/busses/i2c-pca-isa.c
+++ linux-2.6/drivers/i2c/busses/i2c-pca-isa.c
@@ -49,7 +49,8 @@ static void pca_isa_writebyte(void *pd,
 {
 #ifdef DEBUG_IO
 	static char *names[] = { "T/O", "DAT", "ADR", "CON" };
-	printk("*** write %s at %#lx <= %#04x\n", names[reg], base+reg, val);
+	printk(KERN_DEBUG "*** write %s at %#lx <= %#04x\n", names[reg],
+	       base+reg, val);
 #endif
 	outb(val, base+reg);
 }
@@ -60,7 +61,7 @@ static int pca_isa_readbyte(void *pd, in
 #ifdef DEBUG_IO
 	{
 		static char *names[] = { "STA", "DAT", "ADR", "CON" };
-		printk("*** read  %s => %#04x\n", names[reg], res);
+		printk(KERN_DEBUG "*** read  %s => %#04x\n", names[reg], res);
 	}
 #endif
 	return res;
--- linux-2.6.orig/drivers/i2c/busses/i2c-powermac.c
+++ linux-2.6/drivers/i2c/busses/i2c-powermac.c
@@ -191,7 +191,8 @@ static int __devexit i2c_powermac_remove
 	i2c_set_adapdata(adapter, NULL);
 	/* We aren't that prepared to deal with this... */
 	if (rc)
-		printk("i2c-powermac.c: Failed to remove bus %s !\n",
+		printk(KERN_WARNING
+		       "i2c-powermac.c: Failed to remove bus %s !\n",
 		       adapter->name);
 	platform_set_drvdata(dev, NULL);
 	kfree(adapter);
--- linux-2.6.orig/drivers/i2c/busses/i2c-pxa.c
+++ linux-2.6/drivers/i2c/busses/i2c-pxa.c
@@ -210,11 +210,12 @@ static irqreturn_t i2c_pxa_handler(int t
 static void i2c_pxa_scream_blue_murder(struct pxa_i2c *i2c, const char *why)
 {
 	unsigned int i;
-	printk("i2c: error: %s\n", why);
-	printk("i2c: msg_num: %d msg_idx: %d msg_ptr: %d\n",
+	printk(KERN_ERR "i2c: error: %s\n", why);
+	printk(KERN_ERR "i2c: msg_num: %d msg_idx: %d msg_ptr: %d\n",
 		i2c->msg_num, i2c->msg_idx, i2c->msg_ptr);
-	printk("i2c: ICR: %08x ISR: %08x\n"
-	       "i2c: log: ", readl(_ICR(i2c)), readl(_ISR(i2c)));
+	printk(KERN_ERR "i2c: ICR: %08x ISR: %08x\n"
+	       readl(_ICR(i2c)), readl(_ISR(i2c)));
+	printk(KERN_DEBUG "i2c: log: ");
 	for (i = 0; i < i2c->irqlogidx; i++)
 		printk("[%08x:%08x] ", i2c->isrlog[i], i2c->icrlog[i]);
 	printk("\n");

  parent reply	other threads:[~2009-02-08 14:19 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 ` Frank Seidel [this message]
2009-02-08 14:20   ` [PATCHv2 2/2] i2c: adapt debug macros for KERN_* constants Frank Seidel
2009-02-09 15:16     ` 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=498EE9C9.4080002@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;
as well as URLs for NNTP newsgroup(s).