All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Remove multiple uses of KERN_<level>
@ 2010-10-26  2:44 ` Joe Perches
  0 siblings, 0 replies; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Chas Williams,
	Jiri Kosina, Tom Tucker, Steve Wise, Roland Dreier, Sean Hefty,
	Hal Rosenstock, Alessandro Rubini, Dmitry Torokhov,
	Mauro Carvalho Chehab, James E.J. Bottomley, David Brown,
	Daniel Walker, Bryan Huntsman, linux-kernel, linux-atm-general,
	netdev, linux-input, linux-rdma, linux-media, linux-scsi,
	linux-arm-msm

Found using strings vmlinux | grep "^<.>.*<.>"
and a couple of other cleanups of logging message format strings.

Joe Perches (10):
  arch/x86/kernel/apic/io_apic.c: Typo fix WARNING
  drivers/atm/eni.c: Remove multiple uses of KERN_<level>
  drivers/hid/hid-input.c: Remove KERN_DEBUG from dbg_hid use
  drivers/infiniband: Remove unnecessary KERN_<level> uses
  drivers/input/mouse/appletouch.c: Remove KERN_DEBUG use from dprintk
  drivers/input/serio/i8042: Use pr_<level>, pr_fmt.  Fix dbg and __FILE__ use
  drivers/media: Removed unnecessary KERN_<level>s from dprintk uses
  drivers/scsi:mvsas/mv_sas.c: Remove KERN_DEBUG from mv_dprintk use
  drivers/video/msm/mddi.c: Remove multiple KERN_<level> uses
  fs/proc/vmcore.c: Use pr_<level> and pr_<fmt>

 arch/x86/kernel/apic/io_apic.c                |    2 +-
 drivers/atm/eni.c                             |    7 +-
 drivers/hid/hid-input.c                       |    2 +-
 drivers/infiniband/hw/amso1100/c2_intr.c      |    4 +-
 drivers/infiniband/hw/cxgb3/iwch_cm.c         |    4 +-
 drivers/infiniband/hw/cxgb4/cm.c              |    4 +-
 drivers/input/mouse/appletouch.c              |    2 +-
 drivers/input/serio/i8042.c                   |   94 ++++++++++++-------------
 drivers/input/serio/i8042.h                   |   19 +++--
 drivers/media/common/tuners/max2165.c         |   10 +--
 drivers/media/dvb/frontends/atbm8830.c        |    8 +--
 drivers/media/dvb/frontends/lgs8gxx.c         |   11 +--
 drivers/media/video/saa7134/saa7134-input.c   |    2 +-
 drivers/media/video/saa7134/saa7134-tvaudio.c |   12 ++--
 drivers/scsi/mvsas/mv_sas.c                   |    2 +-
 drivers/video/msm/mddi.c                      |    5 +-
 fs/proc/vmcore.c                              |   16 ++---
 17 files changed, 97 insertions(+), 107 deletions(-)

-- 
1.7.3.dirty


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 00/10] Remove multiple uses of KERN_<level>
@ 2010-10-26  2:44 ` Joe Perches
  0 siblings, 0 replies; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86-DgEjT+Ai2ygdnm+yROfE0A, Chas Williams, Jiri Kosina,
	Tom Tucker, Steve Wise, Roland Dreier, Sean Hefty,
	Hal Rosenstock, Alessandro Rubini, Dmitry Torokhov,
	Mauro Carvalho Chehab, James E.J. Bottomley, David Brown,
	Daniel Walker, Bryan Huntsman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-atm-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-media-u79uwXL29TY76Z2rM5mHXA, linux-s

Found using strings vmlinux | grep "^<.>.*<.>"
and a couple of other cleanups of logging message format strings.

Joe Perches (10):
  arch/x86/kernel/apic/io_apic.c: Typo fix WARNING
  drivers/atm/eni.c: Remove multiple uses of KERN_<level>
  drivers/hid/hid-input.c: Remove KERN_DEBUG from dbg_hid use
  drivers/infiniband: Remove unnecessary KERN_<level> uses
  drivers/input/mouse/appletouch.c: Remove KERN_DEBUG use from dprintk
  drivers/input/serio/i8042: Use pr_<level>, pr_fmt.  Fix dbg and __FILE__ use
  drivers/media: Removed unnecessary KERN_<level>s from dprintk uses
  drivers/scsi:mvsas/mv_sas.c: Remove KERN_DEBUG from mv_dprintk use
  drivers/video/msm/mddi.c: Remove multiple KERN_<level> uses
  fs/proc/vmcore.c: Use pr_<level> and pr_<fmt>

 arch/x86/kernel/apic/io_apic.c                |    2 +-
 drivers/atm/eni.c                             |    7 +-
 drivers/hid/hid-input.c                       |    2 +-
 drivers/infiniband/hw/amso1100/c2_intr.c      |    4 +-
 drivers/infiniband/hw/cxgb3/iwch_cm.c         |    4 +-
 drivers/infiniband/hw/cxgb4/cm.c              |    4 +-
 drivers/input/mouse/appletouch.c              |    2 +-
 drivers/input/serio/i8042.c                   |   94 ++++++++++++-------------
 drivers/input/serio/i8042.h                   |   19 +++--
 drivers/media/common/tuners/max2165.c         |   10 +--
 drivers/media/dvb/frontends/atbm8830.c        |    8 +--
 drivers/media/dvb/frontends/lgs8gxx.c         |   11 +--
 drivers/media/video/saa7134/saa7134-input.c   |    2 +-
 drivers/media/video/saa7134/saa7134-tvaudio.c |   12 ++--
 drivers/scsi/mvsas/mv_sas.c                   |    2 +-
 drivers/video/msm/mddi.c                      |    5 +-
 fs/proc/vmcore.c                              |   16 ++---
 17 files changed, 97 insertions(+), 107 deletions(-)

-- 
1.7.3.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 00/10] Remove multiple uses of KERN_<level>
@ 2010-10-26  2:44 ` Joe Perches
  0 siblings, 0 replies; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Chas Williams,
	Jiri Kosina, Tom Tucker, Steve Wise, Roland Dreier, Sean Hefty,
	Hal Rosenstock, Alessandro Rubini, Dmitry Torokhov,
	Mauro Carvalho Chehab, James E.J. Bottomley, David Brown,
	Daniel Walker, Bryan Huntsman, linux-kernel, linux-atm-general,
	netdev, linux-input, linux-rdma, linux-media, linux-scsi,
	linux-arm-msm

Found using strings vmlinux | grep "^<.>.*<.>"
and a couple of other cleanups of logging message format strings.

Joe Perches (10):
  arch/x86/kernel/apic/io_apic.c: Typo fix WARNING
  drivers/atm/eni.c: Remove multiple uses of KERN_<level>
  drivers/hid/hid-input.c: Remove KERN_DEBUG from dbg_hid use
  drivers/infiniband: Remove unnecessary KERN_<level> uses
  drivers/input/mouse/appletouch.c: Remove KERN_DEBUG use from dprintk
  drivers/input/serio/i8042: Use pr_<level>, pr_fmt.  Fix dbg and __FILE__ use
  drivers/media: Removed unnecessary KERN_<level>s from dprintk uses
  drivers/scsi:mvsas/mv_sas.c: Remove KERN_DEBUG from mv_dprintk use
  drivers/video/msm/mddi.c: Remove multiple KERN_<level> uses
  fs/proc/vmcore.c: Use pr_<level> and pr_<fmt>

 arch/x86/kernel/apic/io_apic.c                |    2 +-
 drivers/atm/eni.c                             |    7 +-
 drivers/hid/hid-input.c                       |    2 +-
 drivers/infiniband/hw/amso1100/c2_intr.c      |    4 +-
 drivers/infiniband/hw/cxgb3/iwch_cm.c         |    4 +-
 drivers/infiniband/hw/cxgb4/cm.c              |    4 +-
 drivers/input/mouse/appletouch.c              |    2 +-
 drivers/input/serio/i8042.c                   |   94 ++++++++++++-------------
 drivers/input/serio/i8042.h                   |   19 +++--
 drivers/media/common/tuners/max2165.c         |   10 +--
 drivers/media/dvb/frontends/atbm8830.c        |    8 +--
 drivers/media/dvb/frontends/lgs8gxx.c         |   11 +--
 drivers/media/video/saa7134/saa7134-input.c   |    2 +-
 drivers/media/video/saa7134/saa7134-tvaudio.c |   12 ++--
 drivers/scsi/mvsas/mv_sas.c                   |    2 +-
 drivers/video/msm/mddi.c                      |    5 +-
 fs/proc/vmcore.c                              |   16 ++---
 17 files changed, 97 insertions(+), 107 deletions(-)

-- 
1.7.3.dirty


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 01/10] arch/x86/kernel/apic/io_apic.c: Typo fix WARNING
  2010-10-26  2:44 ` Joe Perches
  (?)
  (?)
@ 2010-10-26  2:44 ` Joe Perches
  2010-10-26  7:48   ` Ingo Molnar
  -1 siblings, 1 reply; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/x86/kernel/apic/io_apic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 8ae808d..4640f72 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -4037,7 +4037,7 @@ int mp_find_ioapic_pin(int ioapic, u32 gsi)
 static int bad_ioapic(unsigned long address)
 {
 	if (nr_ioapics >= MAX_IO_APICS) {
-		printk(KERN_WARNING "WARING: Max # of I/O APICs (%d) exceeded "
+		printk(KERN_WARNING "WARNING: Max # of I/O APICs (%d) exceeded "
 		       "(found %d), skipping\n", MAX_IO_APICS, nr_ioapics);
 		return 1;
 	}
-- 
1.7.3.dirty


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 02/10] drivers/atm/eni.c: Remove multiple uses of KERN_<level>
  2010-10-26  2:44 ` Joe Perches
                   ` (2 preceding siblings ...)
  (?)
@ 2010-10-26  2:44 ` Joe Perches
  -1 siblings, 0 replies; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Chas Williams, linux-atm-general, netdev, linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/atm/eni.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index 80f9f36..97c5898 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -1736,9 +1736,10 @@ static int __devinit eni_do_init(struct atm_dev *dev)
 		eprom = (base+EPROM_SIZE-sizeof(struct midway_eprom));
 		if (readl(&eprom->magic) != ENI155_MAGIC) {
 			printk("\n");
-			printk(KERN_ERR KERN_ERR DEV_LABEL "(itf %d): bad "
-			    "magic - expected 0x%x, got 0x%x\n",dev->number,
-			    ENI155_MAGIC,(unsigned) readl(&eprom->magic));
+			printk(KERN_ERR DEV_LABEL
+			       "(itf %d): bad magic - expected 0x%x, got 0x%x\n",
+			       dev->number, ENI155_MAGIC,
+			       (unsigned)readl(&eprom->magic));
 			error = -EINVAL;
 			goto unmap;
 		}
-- 
1.7.3.dirty


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 03/10] drivers/hid/hid-input.c: Remove KERN_DEBUG from dbg_hid use
  2010-10-26  2:44 ` Joe Perches
                   ` (3 preceding siblings ...)
  (?)
@ 2010-10-26  2:44 ` Joe Perches
  2010-11-03 14:13   ` Jiri Kosina
  -1 siblings, 1 reply; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Jiri Kosina, linux-input, linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/hid/hid-input.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index bb0b365..3a1517a 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -174,7 +174,7 @@ static int hidinput_setkeycode(struct input_dev *dev,
 
 		clear_bit(*old_keycode, dev->keybit);
 		set_bit(usage->code, dev->keybit);
-		dbg_hid(KERN_DEBUG "Assigned keycode %d to HID usage code %x\n",
+		dbg_hid("Assigned keycode %d to HID usage code %x\n",
 			usage->code, usage->hid);
 
 		/*
-- 
1.7.3.dirty


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 04/10] drivers/infiniband: Remove unnecessary KERN_<level> uses
  2010-10-26  2:44 ` Joe Perches
                   ` (4 preceding siblings ...)
  (?)
@ 2010-10-26  2:44 ` Joe Perches
       [not found]   ` <a62c334347cbfbaf5c5acb29c2ae7acda84344a0.1288059486.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
  -1 siblings, 1 reply; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Tom Tucker, Steve Wise, Roland Dreier, Sean Hefty,
	Hal Rosenstock, linux-rdma, linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/infiniband/hw/amso1100/c2_intr.c |    4 ++--
 drivers/infiniband/hw/cxgb3/iwch_cm.c    |    4 ++--
 drivers/infiniband/hw/cxgb4/cm.c         |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/hw/amso1100/c2_intr.c b/drivers/infiniband/hw/amso1100/c2_intr.c
index 3b50954..0ebe4e8 100644
--- a/drivers/infiniband/hw/amso1100/c2_intr.c
+++ b/drivers/infiniband/hw/amso1100/c2_intr.c
@@ -62,8 +62,8 @@ void c2_rnic_interrupt(struct c2_dev *c2dev)
 static void handle_mq(struct c2_dev *c2dev, u32 mq_index)
 {
 	if (c2dev->qptr_array[mq_index] == NULL) {
-		pr_debug(KERN_INFO "handle_mq: stray activity for mq_index=%d\n",
-			mq_index);
+		pr_debug("handle_mq: stray activity for mq_index=%d\n",
+			 mq_index);
 		return;
 	}
 
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
index 13c8887..d02dcc6 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
@@ -1093,8 +1093,8 @@ static int tx_ack(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
 	PDBG("%s ep %p credits %u\n", __func__, ep, credits);
 
 	if (credits == 0) {
-		PDBG(KERN_ERR "%s 0 credit ack  ep %p state %u\n",
-			__func__, ep, state_read(&ep->com));
+		PDBG("%s 0 credit ack  ep %p state %u\n",
+		     __func__, ep, state_read(&ep->com));
 		return CPL_RET_BUF_DONE;
 	}
 
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 32d352a..8f812cf 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -1762,8 +1762,8 @@ static int fw4_ack(struct c4iw_dev *dev, struct sk_buff *skb)
 	ep = lookup_tid(t, tid);
 	PDBG("%s ep %p tid %u credits %u\n", __func__, ep, ep->hwtid, credits);
 	if (credits == 0) {
-		PDBG(KERN_ERR "%s 0 credit ack ep %p tid %u state %u\n",
-			__func__, ep, ep->hwtid, state_read(&ep->com));
+		PDBG("%s 0 credit ack ep %p tid %u state %u\n",
+		     __func__, ep, ep->hwtid, state_read(&ep->com));
 		return 0;
 	}
 
-- 
1.7.3.dirty

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 05/10] drivers/input/mouse/appletouch.c: Remove KERN_DEBUG use from dprintk
  2010-10-26  2:44 ` Joe Perches
@ 2010-10-26  2:44   ` Joe Perches
  -1 siblings, 0 replies; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Alessandro Rubini, Dmitry Torokhov, linux-input, linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/input/mouse/appletouch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index a9cf768..b77f999 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -630,7 +630,7 @@ static void atp_complete_geyser_3_4(struct urb *urb)
 	/* Just update the base values (i.e. touchpad in untouched state) */
 	if (dev->data[dev->info->datalen - 1] & ATP_STATUS_BASE_UPDATE) {
 
-		dprintk(KERN_DEBUG "appletouch: updated base values\n");
+		dprintk("appletouch: updated base values\n");
 
 		memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old));
 		goto exit;
-- 
1.7.3.dirty


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 05/10] drivers/input/mouse/appletouch.c: Remove KERN_DEBUG use from dprintk
@ 2010-10-26  2:44   ` Joe Perches
  0 siblings, 0 replies; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Alessandro Rubini, Dmitry Torokhov, linux-input, linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/input/mouse/appletouch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index a9cf768..b77f999 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -630,7 +630,7 @@ static void atp_complete_geyser_3_4(struct urb *urb)
 	/* Just update the base values (i.e. touchpad in untouched state) */
 	if (dev->data[dev->info->datalen - 1] & ATP_STATUS_BASE_UPDATE) {
 
-		dprintk(KERN_DEBUG "appletouch: updated base values\n");
+		dprintk("appletouch: updated base values\n");
 
 		memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old));
 		goto exit;
-- 
1.7.3.dirty

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt.  Fix dbg and __FILE__ use
  2010-10-26  2:44 ` Joe Perches
                   ` (6 preceding siblings ...)
  (?)
@ 2010-10-26  2:44 ` Joe Perches
  2010-10-26 15:50   ` Dmitry Torokhov
  -1 siblings, 1 reply; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Dmitry Torokhov, linux-input, linux-kernel

Standardized message logging prefixes.
Removed \n from dbg macro, added \n to each dbg call site.
A couple of uses of dbg already had a \n.
Removed direct use of __FILE__ from dbg, converted to pr_fmt(fmt)
Added non-debug printf argument verification of dbg calls
Removed "i8042.c" from printks, converted to pr_<level>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/input/serio/i8042.c |   94 ++++++++++++++++++++-----------------------
 drivers/input/serio/i8042.h |   19 +++++---
 2 files changed, 56 insertions(+), 57 deletions(-)

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 18db5a8..61ef34a 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -10,6 +10,8 @@
  * the Free Software Foundation.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/delay.h>
 #include <linux/module.h>
@@ -225,8 +227,8 @@ static int i8042_flush(void)
 		udelay(50);
 		data = i8042_read_data();
 		i++;
-		dbg("%02x <- i8042 (flush, %s)", data,
-			str & I8042_STR_AUXDATA ? "aux" : "kbd");
+		dbg("%02x <- i8042 (flush, %s)\n",
+		    data, str & I8042_STR_AUXDATA ? "aux" : "kbd");
 	}
 
 	spin_unlock_irqrestore(&i8042_lock, flags);
@@ -253,32 +255,32 @@ static int __i8042_command(unsigned char *param, int command)
 	if (error)
 		return error;
 
-	dbg("%02x -> i8042 (command)", command & 0xff);
+	dbg("%02x -> i8042 (command)\n", command & 0xff);
 	i8042_write_command(command & 0xff);
 
 	for (i = 0; i < ((command >> 12) & 0xf); i++) {
 		error = i8042_wait_write();
 		if (error)
 			return error;
-		dbg("%02x -> i8042 (parameter)", param[i]);
+		dbg("%02x -> i8042 (parameter)\n", param[i]);
 		i8042_write_data(param[i]);
 	}
 
 	for (i = 0; i < ((command >> 8) & 0xf); i++) {
 		error = i8042_wait_read();
 		if (error) {
-			dbg("     -- i8042 (timeout)");
+			dbg("     -- i8042 (timeout)\n");
 			return error;
 		}
 
 		if (command == I8042_CMD_AUX_LOOP &&
 		    !(i8042_read_status() & I8042_STR_AUXDATA)) {
-			dbg("     -- i8042 (auxerr)");
+			dbg("     -- i8042 (auxerr)\n");
 			return -1;
 		}
 
 		param[i] = i8042_read_data();
-		dbg("%02x <- i8042 (return)", param[i]);
+		dbg("%02x <- i8042 (return)\n", param[i]);
 	}
 
 	return 0;
@@ -309,7 +311,7 @@ static int i8042_kbd_write(struct serio *port, unsigned char c)
 	spin_lock_irqsave(&i8042_lock, flags);
 
 	if (!(retval = i8042_wait_write())) {
-		dbg("%02x -> i8042 (kbd-data)", c);
+		dbg("%02x -> i8042 (kbd-data)\n", c);
 		i8042_write_data(c);
 	}
 
@@ -355,17 +357,14 @@ static void i8042_port_close(struct serio *serio)
 
 	i8042_ctr &= ~irq_bit;
 	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
-		printk(KERN_WARNING
-			"i8042.c: Can't write CTR while closing %s port.\n",
-			port_name);
+		pr_warn("Can't write CTR while closing %s port\n", port_name);
 
 	udelay(50);
 
 	i8042_ctr &= ~disable_bit;
 	i8042_ctr |= irq_bit;
 	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
-		printk(KERN_ERR "i8042.c: Can't reactivate %s port.\n",
-			port_name);
+		pr_err("Can't reactivate %s port\n", port_name);
 
 	/*
 	 * See if there is any data appeared while we were messing with
@@ -456,7 +455,8 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id)
 	str = i8042_read_status();
 	if (unlikely(~str & I8042_STR_OBF)) {
 		spin_unlock_irqrestore(&i8042_lock, flags);
-		if (irq) dbg("Interrupt %d, without any data", irq);
+		if (irq)
+			dbg("Interrupt %d, without any data\n", irq);
 		ret = 0;
 		goto out;
 	}
@@ -469,7 +469,8 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id)
 
 		dfl = 0;
 		if (str & I8042_STR_MUXERR) {
-			dbg("MUX error, status is %02x, data is %02x", str, data);
+			dbg("MUX error, status is %02x, data is %02x\n",
+			    str, data);
 /*
  * When MUXERR condition is signalled the data register can only contain
  * 0xfd, 0xfe or 0xff if implementation follows the spec. Unfortunately
@@ -512,7 +513,7 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id)
 	port = &i8042_ports[port_no];
 	serio = port->exists ? port->serio : NULL;
 
-	dbg("%02x <- i8042 (interrupt, %d, %d%s%s)",
+	dbg("%02x <- i8042 (interrupt, %d, %d%s%s)\n",
 	    data, port_no, irq,
 	    dfl & SERIO_PARITY ? ", bad parity" : "",
 	    dfl & SERIO_TIMEOUT ? ", timeout" : "");
@@ -540,7 +541,7 @@ static int i8042_enable_kbd_port(void)
 	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
 		i8042_ctr &= ~I8042_CTR_KBDINT;
 		i8042_ctr |= I8042_CTR_KBDDIS;
-		printk(KERN_ERR "i8042.c: Failed to enable KBD port.\n");
+		pr_err("Failed to enable KBD port\n");
 		return -EIO;
 	}
 
@@ -559,7 +560,7 @@ static int i8042_enable_aux_port(void)
 	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
 		i8042_ctr &= ~I8042_CTR_AUXINT;
 		i8042_ctr |= I8042_CTR_AUXDIS;
-		printk(KERN_ERR "i8042.c: Failed to enable AUX port.\n");
+		pr_err("Failed to enable AUX port\n");
 		return -EIO;
 	}
 
@@ -641,7 +642,7 @@ static int __init i8042_check_mux(void)
 	if (i8042_set_mux_mode(true, &mux_version))
 		return -1;
 
-	printk(KERN_INFO "i8042.c: Detected active multiplexing controller, rev %d.%d.\n",
+	pr_info("Detected active multiplexing controller, rev %d.%d\n",
 		(mux_version >> 4) & 0xf, mux_version & 0xf);
 
 /*
@@ -651,7 +652,7 @@ static int __init i8042_check_mux(void)
 	i8042_ctr &= ~I8042_CTR_AUXINT;
 
 	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
-		printk(KERN_ERR "i8042.c: Failed to disable AUX port, can't use MUX.\n");
+		pr_err("Failed to disable AUX port, can't use MUX\n");
 		return -EIO;
 	}
 
@@ -676,8 +677,8 @@ static irqreturn_t __init i8042_aux_test_irq(int irq, void *dev_id)
 	str = i8042_read_status();
 	if (str & I8042_STR_OBF) {
 		data = i8042_read_data();
-		dbg("%02x <- i8042 (aux_test_irq, %s)",
-			data, str & I8042_STR_AUXDATA ? "aux" : "kbd");
+		dbg("%02x <- i8042 (aux_test_irq, %s)\n",
+		    data, str & I8042_STR_AUXDATA ? "aux" : "kbd");
 		if (i8042_irq_being_tested &&
 		    data == 0xa5 && (str & I8042_STR_AUXDATA))
 			complete(&i8042_aux_irq_delivered);
@@ -770,8 +771,8 @@ static int __init i8042_check_aux(void)
  */
 
 	if (i8042_toggle_aux(false)) {
-		printk(KERN_WARNING "Failed to disable AUX port, but continuing anyway... Is this a SiS?\n");
-		printk(KERN_WARNING "If AUX port is really absent please use the 'i8042.noaux' option.\n");
+		pr_warn("Failed to disable AUX port, but continuing anyway... Is this a SiS?\n");
+		pr_warn("If AUX port is really absent please use the 'i8042.noaux' option.\n");
 	}
 
 	if (i8042_toggle_aux(true))
@@ -819,7 +820,7 @@ static int __init i8042_check_aux(void)
  * AUX IRQ was never delivered so we need to flush the controller to
  * get rid of the byte we put there; otherwise keyboard may not work.
  */
-		dbg("     -- i8042 (aux irq test timeout)");
+		dbg("     -- i8042 (aux irq test timeout)\n");
 		i8042_flush();
 		retval = -1;
 	}
@@ -845,7 +846,7 @@ static int __init i8042_check_aux(void)
 static int i8042_controller_check(void)
 {
 	if (i8042_flush() == I8042_BUFFER_SIZE) {
-		printk(KERN_ERR "i8042.c: No controller found.\n");
+		pr_err("No controller found\n");
 		return -ENODEV;
 	}
 
@@ -864,15 +865,15 @@ static int i8042_controller_selftest(void)
 	do {
 
 		if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
-			printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
+			pr_err("i8042 controller self test timeout\n");
 			return -ENODEV;
 		}
 
 		if (param == I8042_RET_CTL_TEST)
 			return 0;
 
-		printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n",
-			param, I8042_RET_CTL_TEST);
+		pr_err("i8042 controller selftest failed. (%#x != %#x)\n",
+		       param, I8042_RET_CTL_TEST);
 		msleep(50);
 	} while (i++ < 5);
 
@@ -883,8 +884,7 @@ static int i8042_controller_selftest(void)
 	 * and user will still get a working keyboard. This is especially
 	 * important on netbooks. On other arches we trust hardware more.
 	 */
-	printk(KERN_INFO
-		"i8042: giving up on controller selftest, continuing anyway...\n");
+	pr_info("giving up on controller selftest, continuing anyway...\n");
 	return 0;
 #else
 	return -EIO;
@@ -909,8 +909,7 @@ static int i8042_controller_init(void)
 
 	do {
 		if (n >= 10) {
-			printk(KERN_ERR
-				"i8042.c: Unable to get stable CTR read.\n");
+			pr_err("Unable to get stable CTR read\n");
 			return -EIO;
 		}
 
@@ -918,8 +917,7 @@ static int i8042_controller_init(void)
 			udelay(50);
 
 		if (i8042_command(&ctr[n++ % 2], I8042_CMD_CTL_RCTR)) {
-			printk(KERN_ERR
-				"i8042.c: Can't read CTR while initializing i8042.\n");
+			pr_err("Can't read CTR while initializing i8042\n");
 			return -EIO;
 		}
 
@@ -943,7 +941,7 @@ static int i8042_controller_init(void)
 		if (i8042_unlock)
 			i8042_ctr |= I8042_CTR_IGNKEYLOCK;
 		else
-			printk(KERN_WARNING "i8042.c: Warning: Keylock active.\n");
+			pr_warn("Warning: Keylock active\n");
 	}
 	spin_unlock_irqrestore(&i8042_lock, flags);
 
@@ -970,7 +968,7 @@ static int i8042_controller_init(void)
  */
 
 	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
-		printk(KERN_ERR "i8042.c: Can't write CTR while initializing i8042.\n");
+		pr_err("Can't write CTR while initializing i8042\n");
 		return -EIO;
 	}
 
@@ -1000,7 +998,7 @@ static void i8042_controller_reset(void)
 	i8042_ctr &= ~(I8042_CTR_KBDINT | I8042_CTR_AUXINT);
 
 	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
-		printk(KERN_WARNING "i8042.c: Can't write CTR while resetting.\n");
+		pr_warn("Can't write CTR while resetting\n");
 
 /*
  * Disable MUX mode if present.
@@ -1021,7 +1019,7 @@ static void i8042_controller_reset(void)
  */
 
 	if (i8042_command(&i8042_initial_ctr, I8042_CMD_CTL_WCTR))
-		printk(KERN_WARNING "i8042.c: Can't restore CTR.\n");
+		pr_warn("Can't restore CTR\n");
 }
 
 
@@ -1045,14 +1043,14 @@ static long i8042_panic_blink(int state)
 	led = (state) ? 0x01 | 0x04 : 0;
 	while (i8042_read_status() & I8042_STR_IBF)
 		DELAY;
-	dbg("%02x -> i8042 (panic blink)", 0xed);
+	dbg("%02x -> i8042 (panic blink)\n", 0xed);
 	i8042_suppress_kbd_ack = 2;
 	i8042_write_data(0xed); /* set leds */
 	DELAY;
 	while (i8042_read_status() & I8042_STR_IBF)
 		DELAY;
 	DELAY;
-	dbg("%02x -> i8042 (panic blink)", led);
+	dbg("%02x -> i8042 (panic blink)\n", led);
 	i8042_write_data(led);
 	DELAY;
 	return delay;
@@ -1068,9 +1066,7 @@ static void i8042_dritek_enable(void)
 
 	error = i8042_command(&param, 0x1059);
 	if (error)
-		printk(KERN_WARNING
-			"Failed to enable DRITEK extension: %d\n",
-			error);
+		pr_warn("Failed to enable DRITEK extension: %d\n", error);
 }
 #endif
 
@@ -1105,10 +1101,10 @@ static int i8042_controller_resume(bool force_reset)
 	i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS;
 	i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT);
 	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
-		printk(KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n");
+		pr_warn("Can't write CTR to resume, retrying...\n");
 		msleep(50);
 		if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
-			printk(KERN_ERR "i8042: CTR write retry failed\n");
+			pr_err("CTR write retry failed\n");
 			return -EIO;
 		}
 	}
@@ -1121,9 +1117,7 @@ static int i8042_controller_resume(bool force_reset)
 
 	if (i8042_mux_present) {
 		if (i8042_set_mux_mode(true, NULL) || i8042_enable_mux_ports())
-			printk(KERN_WARNING
-				"i8042: failed to resume active multiplexor, "
-				"mouse won't work.\n");
+			pr_warn("failed to resume active multiplexor, mouse won't work\n");
 	} else if (i8042_ports[I8042_AUX_PORT_NO].serio)
 		i8042_enable_aux_port();
 
@@ -1268,7 +1262,7 @@ static void __init i8042_register_ports(void)
 
 	for (i = 0; i < I8042_NUM_PORTS; i++) {
 		if (i8042_ports[i].serio) {
-			printk(KERN_INFO "serio: %s at %#lx,%#lx irq %d\n",
+			pr_info("%s at %#lx,%#lx irq %d\n",
 				i8042_ports[i].serio->name,
 				(unsigned long) I8042_DATA_REG,
 				(unsigned long) I8042_COMMAND_REG,
diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h
index cbc1beb..f510950 100644
--- a/drivers/input/serio/i8042.h
+++ b/drivers/input/serio/i8042.h
@@ -89,15 +89,20 @@
 #ifdef DEBUG
 static unsigned long i8042_start_time;
 #define dbg_init() do { i8042_start_time = jiffies; } while (0)
-#define dbg(format, arg...) 							\
-	do { 									\
-		if (i8042_debug)						\
-			printk(KERN_DEBUG __FILE__ ": " format " [%d]\n" ,	\
-	 			## arg, (int) (jiffies - i8042_start_time));	\
-	} while (0)
+#define dbg(format, arg...)						\
+do {									\
+	if (i8042_debug)						\
+		printk(KERN_DEBUG pr_fmt(format "[%d]"),		\
+		       ##arg, (int)(jiffies - i8042_start_time));	\
+} while (0)
+
 #else
 #define dbg_init() do { } while (0)
-#define dbg(format, arg...) do {} while (0)
+#define dbg(format, arg...)						\
+do {									\
+	if (0)								\
+		printk(KERN_DEBUG pr_fmt(format), ##arg);		\
+} while (0)
 #endif
 
 #endif /* _I8042_H */
-- 
1.7.3.dirty


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 07/10] drivers/media: Removed unnecessary KERN_<level>s from dprintk uses
  2010-10-26  2:44 ` Joe Perches
                   ` (7 preceding siblings ...)
  (?)
@ 2010-10-26  2:44 ` Joe Perches
  -1 siblings, 0 replies; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel

Converted if (debug >= 2) printk(KERN_DEBUG... to if debug >= 2) dprintk(...)

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/media/common/tuners/max2165.c         |   10 ++++------
 drivers/media/dvb/frontends/atbm8830.c        |    8 +++-----
 drivers/media/dvb/frontends/lgs8gxx.c         |   11 ++++-------
 drivers/media/video/saa7134/saa7134-input.c   |    2 +-
 drivers/media/video/saa7134/saa7134-tvaudio.c |   12 ++++++------
 5 files changed, 18 insertions(+), 25 deletions(-)

diff --git a/drivers/media/common/tuners/max2165.c b/drivers/media/common/tuners/max2165.c
index 937e4b0..9883617 100644
--- a/drivers/media/common/tuners/max2165.c
+++ b/drivers/media/common/tuners/max2165.c
@@ -52,13 +52,12 @@ static int max2165_write_reg(struct max2165_priv *priv, u8 reg, u8 data)
 	msg.addr = priv->config->i2c_address;
 
 	if (debug >= 2)
-		printk(KERN_DEBUG "%s: reg=0x%02X, data=0x%02X\n",
-			__func__, reg, data);
+		dprintk("%s: reg=0x%02X, data=0x%02X\n", __func__, reg, data);
 
 	ret = i2c_transfer(priv->i2c, &msg, 1);
 
 	if (ret != 1)
-		dprintk(KERN_DEBUG "%s: error reg=0x%x, data=0x%x, ret=%i\n",
+		dprintk("%s: error reg=0x%x, data=0x%x, ret=%i\n",
 			__func__, reg, data, ret);
 
 	return (ret != 1) ? -EIO : 0;
@@ -78,14 +77,13 @@ static int max2165_read_reg(struct max2165_priv *priv, u8 reg, u8 *p_data)
 
 	ret = i2c_transfer(priv->i2c, msg, 2);
 	if (ret != 2) {
-		dprintk(KERN_DEBUG "%s: error reg=0x%x, ret=%i\n",
-			__func__, reg, ret);
+		dprintk("%s: error reg=0x%x, ret=%i\n", __func__, reg, ret);
 		return -EIO;
 	}
 
 	*p_data = b1[0];
 	if (debug >= 2)
-		printk(KERN_DEBUG "%s: reg=0x%02X, data=0x%02X\n",
+		dprintk("%s: reg=0x%02X, data=0x%02X\n",
 			__func__, reg, b1[0]);
 	return 0;
 }
diff --git a/drivers/media/dvb/frontends/atbm8830.c b/drivers/media/dvb/frontends/atbm8830.c
index 43aac2f..1539ea1 100644
--- a/drivers/media/dvb/frontends/atbm8830.c
+++ b/drivers/media/dvb/frontends/atbm8830.c
@@ -50,8 +50,7 @@ static int atbm8830_write_reg(struct atbm_state *priv, u16 reg, u8 data)
 	msg2.addr = dev_addr;
 
 	if (debug >= 2)
-		printk(KERN_DEBUG "%s: reg=0x%04X, data=0x%02X\n",
-			__func__, reg, data);
+		dprintk("%s: reg=0x%04X, data=0x%02X\n", __func__, reg, data);
 
 	ret = i2c_transfer(priv->i2c, &msg1, 1);
 	if (ret != 1)
@@ -77,8 +76,7 @@ static int atbm8830_read_reg(struct atbm_state *priv, u16 reg, u8 *p_data)
 
 	ret = i2c_transfer(priv->i2c, &msg1, 1);
 	if (ret != 1) {
-		dprintk(KERN_DEBUG "%s: error reg=0x%04x, ret=%i\n",
-			__func__, reg, ret);
+		dprintk("%s: error reg=0x%04x, ret=%i\n", __func__, reg, ret);
 		return -EIO;
 	}
 
@@ -88,7 +86,7 @@ static int atbm8830_read_reg(struct atbm_state *priv, u16 reg, u8 *p_data)
 
 	*p_data = buf2[0];
 	if (debug >= 2)
-		printk(KERN_DEBUG "%s: reg=0x%04X, data=0x%02X\n",
+		dprintk("%s: reg=0x%04X, data=0x%02X\n",
 			__func__, reg, buf2[0]);
 
 	return 0;
diff --git a/drivers/media/dvb/frontends/lgs8gxx.c b/drivers/media/dvb/frontends/lgs8gxx.c
index 5ea28ae..8989f8f 100644
--- a/drivers/media/dvb/frontends/lgs8gxx.c
+++ b/drivers/media/dvb/frontends/lgs8gxx.c
@@ -60,13 +60,12 @@ static int lgs8gxx_write_reg(struct lgs8gxx_state *priv, u8 reg, u8 data)
 		msg.addr += 0x02;
 
 	if (debug >= 2)
-		printk(KERN_DEBUG "%s: reg=0x%02X, data=0x%02X\n",
-			__func__, reg, data);
+		dprintk("%s: reg=0x%02X, data=0x%02X\n", __func__, reg, data);
 
 	ret = i2c_transfer(priv->i2c, &msg, 1);
 
 	if (ret != 1)
-		dprintk(KERN_DEBUG "%s: error reg=0x%x, data=0x%x, ret=%i\n",
+		dprintk("%s: error reg=0x%x, data=0x%x, ret=%i\n",
 			__func__, reg, data, ret);
 
 	return (ret != 1) ? -1 : 0;
@@ -91,15 +90,13 @@ static int lgs8gxx_read_reg(struct lgs8gxx_state *priv, u8 reg, u8 *p_data)
 
 	ret = i2c_transfer(priv->i2c, msg, 2);
 	if (ret != 2) {
-		dprintk(KERN_DEBUG "%s: error reg=0x%x, ret=%i\n",
-			__func__, reg, ret);
+		dprintk("%s: error reg=0x%x, ret=%i\n", __func__, reg, ret);
 		return -1;
 	}
 
 	*p_data = b1[0];
 	if (debug >= 2)
-		printk(KERN_DEBUG "%s: reg=0x%02X, data=0x%02X\n",
-			__func__, reg, b1[0]);
+		dprintk("%s: reg=0x%02X, data=0x%02X\n", __func__, reg, b1[0]);
 	return 0;
 }
 
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 0b336ca..f81a19f 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -965,7 +965,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
 		   an existing device. Weird...
 		   REVISIT: might no longer be needed */
 		rc = i2c_transfer(&dev->i2c_adap, &msg_msi, 1);
-		dprintk(KERN_DEBUG "probe 0x%02x @ %s: %s\n",
+		dprintk("probe 0x%02x @ %s: %s\n",
 			msg_msi.addr, dev->i2c_adap.name,
 			(1 == rc) ? "yes" : "no");
 		break;
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c
index 3e7d2fd..57e646b 100644
--- a/drivers/media/video/saa7134/saa7134-tvaudio.c
+++ b/drivers/media/video/saa7134/saa7134-tvaudio.c
@@ -550,16 +550,16 @@ static int tvaudio_thread(void *data)
 		} else if (0 != dev->last_carrier) {
 			/* no carrier -- try last detected one as fallback */
 			carrier = dev->last_carrier;
-			dprintk(KERN_WARNING "%s/audio: audio carrier scan failed, "
-			       "using %d.%03d MHz [last detected]\n",
-			       dev->name, carrier/1000, carrier%1000);
+			dprintk("audio carrier scan failed, "
+				"using %d.%03d MHz [last detected]\n",
+				carrier/1000, carrier%1000);
 
 		} else {
 			/* no carrier + no fallback -- use default */
 			carrier = default_carrier;
-			dprintk(KERN_WARNING "%s/audio: audio carrier scan failed, "
-			       "using %d.%03d MHz [default]\n",
-			       dev->name, carrier/1000, carrier%1000);
+			dprintk("audio carrier scan failed, "
+				"using %d.%03d MHz [default]\n",
+				carrier/1000, carrier%1000);
 		}
 		tvaudio_setcarrier(dev,carrier,carrier);
 		dev->automute = 0;
-- 
1.7.3.dirty


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 08/10] drivers/scsi:mvsas/mv_sas.c: Remove KERN_DEBUG from mv_dprintk use
  2010-10-26  2:44 ` Joe Perches
                   ` (8 preceding siblings ...)
  (?)
@ 2010-10-26  2:44 ` Joe Perches
  -1 siblings, 0 replies; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: James E.J. Bottomley, linux-scsi, linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/scsi/mvsas/mv_sas.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index adedaa9..f8bed25 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -1698,7 +1698,7 @@ int mvs_abort_task(struct sas_task *task)
 			struct task_status_struct *tstat;
 			u32 slot_idx = (u32)(slot - mvi->slot_info);
 			tstat = &task->task_status;
-			mv_dprintk(KERN_DEBUG "mv_abort_task() mvi=%p task=%p "
+			mv_dprintk("mv_abort_task() mvi=%p task=%p "
 				   "slot=%p slot_idx=x%x\n",
 				   mvi, task, slot, slot_idx);
 			tstat->stat = SAS_ABORTED_TASK;
-- 
1.7.3.dirty


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 09/10] drivers/video/msm/mddi.c: Remove multiple KERN_<level> uses
  2010-10-26  2:44 ` Joe Perches
                   ` (9 preceding siblings ...)
  (?)
@ 2010-10-26  2:44 ` Joe Perches
  2010-10-28 17:08   ` Daniel Walker
  -1 siblings, 1 reply; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: David Brown, Daniel Walker, Bryan Huntsman, linux-arm-msm, linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/video/msm/mddi.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/video/msm/mddi.c b/drivers/video/msm/mddi.c
index 7c316c3..b66d86a 100644
--- a/drivers/video/msm/mddi.c
+++ b/drivers/video/msm/mddi.c
@@ -318,7 +318,7 @@ static long mddi_wait_interrupt_timeout(struct mddi_info *mddi,
 static void mddi_wait_interrupt(struct mddi_info *mddi, uint32_t intmask)
 {
 	if (mddi_wait_interrupt_timeout(mddi, intmask, HZ/10) == 0)
-		printk(KERN_INFO KERN_ERR "mddi_wait_interrupt %d, timeout "
+		printk(KERN_INFO "mddi_wait_interrupt %d, timeout "
 		       "waiting for %x, INT = %x, STAT = %x gotint = %x\n",
 		       current->pid, intmask, mddi_readl(INT), mddi_readl(STAT),
 		       mddi->got_int);
@@ -465,8 +465,7 @@ static int __init mddi_get_client_caps(struct mddi_info *mddi)
 
 		if (mddi->flags & FLAG_HAVE_CAPS)
 			break;
-		printk(KERN_INFO KERN_ERR "mddi_init, timeout waiting for "
-				"caps\n");
+		printk(KERN_INFO "mddi_init, timeout waiting for caps\n");
 	}
 	return mddi->flags & FLAG_HAVE_CAPS;
 }
-- 
1.7.3.dirty


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 10/10] fs/proc/vmcore.c: Use pr_<level> and pr_<fmt>
  2010-10-26  2:44 ` Joe Perches
                   ` (10 preceding siblings ...)
  (?)
@ 2010-10-26  2:44 ` Joe Perches
  -1 siblings, 0 replies; 33+ messages in thread
From: Joe Perches @ 2010-10-26  2:44 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-kernel

Added #define pr_fmt(fmt) "kdump: " fmt
Converted printk(KERN_WARNING...) to pr_warn(...) adding
the "kdump: " prefix.
Converted "is notsane" to "is not sane" to match other uses.

Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/proc/vmcore.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 2367fb3..a46a962 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -7,6 +7,8 @@
  *
  */
 
+#define pr_fmt(fmt) "kdump: " fmt
+
 #include <linux/mm.h>
 #include <linux/proc_fs.h>
 #include <linux/user.h>
@@ -506,8 +508,7 @@ static int __init parse_crash_elf64_headers(void)
 		ehdr.e_ehsize != sizeof(Elf64_Ehdr) ||
 		ehdr.e_phentsize != sizeof(Elf64_Phdr) ||
 		ehdr.e_phnum == 0) {
-		printk(KERN_WARNING "Warning: Core image elf header is not"
-					"sane\n");
+		pr_warn("Warning: Core image elf header is not sane\n");
 		return -EINVAL;
 	}
 
@@ -562,8 +563,7 @@ static int __init parse_crash_elf32_headers(void)
 		ehdr.e_ehsize != sizeof(Elf32_Ehdr) ||
 		ehdr.e_phentsize != sizeof(Elf32_Phdr) ||
 		ehdr.e_phnum == 0) {
-		printk(KERN_WARNING "Warning: Core image elf header is not"
-					"sane\n");
+		pr_warn("Warning: Core image elf header is not sane\n");
 		return -EINVAL;
 	}
 
@@ -606,8 +606,7 @@ static int __init parse_crash_elf_headers(void)
 	if (rc < 0)
 		return rc;
 	if (memcmp(e_ident, ELFMAG, SELFMAG) != 0) {
-		printk(KERN_WARNING "Warning: Core image elf header"
-					" not found\n");
+		pr_warn("Warning: Core image elf header not found\n");
 		return -EINVAL;
 	}
 
@@ -626,8 +625,7 @@ static int __init parse_crash_elf_headers(void)
 		/* Determine vmcore size. */
 		vmcore_size = get_vmcore_size_elf32(elfcorebuf);
 	} else {
-		printk(KERN_WARNING "Warning: Core image elf header is not"
-					" sane\n");
+		pr_warn("Warning: Core image elf header is not sane\n");
 		return -EINVAL;
 	}
 	return 0;
@@ -643,7 +641,7 @@ static int __init vmcore_init(void)
 		return rc;
 	rc = parse_crash_elf_headers();
 	if (rc) {
-		printk(KERN_WARNING "Kdump: vmcore not initialized\n");
+		pr_warn("vmcore not initialized\n");
 		return rc;
 	}
 
-- 
1.7.3.dirty


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH 01/10] arch/x86/kernel/apic/io_apic.c: Typo fix WARNING
  2010-10-26  2:44 ` [PATCH 01/10] arch/x86/kernel/apic/io_apic.c: Typo fix WARNING Joe Perches
@ 2010-10-26  7:48   ` Ingo Molnar
  2010-10-26  8:23     ` Joe Perches
  0 siblings, 1 reply; 33+ messages in thread
From: Ingo Molnar @ 2010-10-26  7:48 UTC (permalink / raw)
  To: Joe Perches
  Cc: Jiri Kosina, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	linux-kernel


* Joe Perches <joe@perches.com> wrote:

> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/x86/kernel/apic/io_apic.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index 8ae808d..4640f72 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -4037,7 +4037,7 @@ int mp_find_ioapic_pin(int ioapic, u32 gsi)
>  static int bad_ioapic(unsigned long address)
>  {
>  	if (nr_ioapics >= MAX_IO_APICS) {
> -		printk(KERN_WARNING "WARING: Max # of I/O APICs (%d) exceeded "
> +		printk(KERN_WARNING "WARNING: Max # of I/O APICs (%d) exceeded "
>  		       "(found %d), skipping\n", MAX_IO_APICS, nr_ioapics);

While you are touching this please fix the other glaring problem this printk has.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 01/10] arch/x86/kernel/apic/io_apic.c: Typo fix WARNING
  2010-10-26  7:48   ` Ingo Molnar
@ 2010-10-26  8:23     ` Joe Perches
  0 siblings, 0 replies; 33+ messages in thread
From: Joe Perches @ 2010-10-26  8:23 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jiri Kosina, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	linux-kernel

On Tue, 26 Oct 2010, Ingo Molnar wrote:
> >  arch/x86/kernel/apic/io_apic.c |    2 +-
> > -		printk(KERN_WARNING "WARING: Max # of I/O APICs (%d) exceeded "
> > +		printk(KERN_WARNING "WARNING: Max # of I/O APICs (%d) exceeded "
> >  		       "(found %d), skipping\n", MAX_IO_APICS, nr_ioapics);
> While you are touching this please fix the other glaring problem this printk has.

There are 14 of these split lines formats in io_apic.c,
19 in apic and 1 in x2apic_uv_x.c.

There are also many apic_printk calls without KERN_<level>.

I prefer changing all of them at the same time rather
than 1 at a time.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 04/10] drivers/infiniband: Remove unnecessary KERN_<level> uses
  2010-10-26  2:44 ` [PATCH 04/10] drivers/infiniband: Remove unnecessary KERN_<level> uses Joe Perches
@ 2010-10-26 11:29       ` Steve Wise
  0 siblings, 0 replies; 33+ messages in thread
From: Steve Wise @ 2010-10-26 11:29 UTC (permalink / raw)
  To: Joe Perches
  Cc: Jiri Kosina, Tom Tucker, Roland Dreier, Sean Hefty,
	Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA


On 10/25/2010 9:44 PM, Joe Perches wrote:
> Signed-off-by: Joe Perches<joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
> ---
>   drivers/infiniband/hw/amso1100/c2_intr.c |    4 ++--
>   drivers/infiniband/hw/cxgb3/iwch_cm.c    |    4 ++--
>   drivers/infiniband/hw/cxgb4/cm.c         |    4 ++--
>   3 files changed, 6 insertions(+), 6 deletions(-)
>

Acked-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 04/10] drivers/infiniband: Remove unnecessary KERN_<level> uses
@ 2010-10-26 11:29       ` Steve Wise
  0 siblings, 0 replies; 33+ messages in thread
From: Steve Wise @ 2010-10-26 11:29 UTC (permalink / raw)
  To: Joe Perches
  Cc: Jiri Kosina, Tom Tucker, Roland Dreier, Sean Hefty,
	Hal Rosenstock, linux-rdma, linux-kernel


On 10/25/2010 9:44 PM, Joe Perches wrote:
> Signed-off-by: Joe Perches<joe@perches.com>
> ---
>   drivers/infiniband/hw/amso1100/c2_intr.c |    4 ++--
>   drivers/infiniband/hw/cxgb3/iwch_cm.c    |    4 ++--
>   drivers/infiniband/hw/cxgb4/cm.c         |    4 ++--
>   3 files changed, 6 insertions(+), 6 deletions(-)
>

Acked-by: Steve Wise <swise@opengridcomputing.com>


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use
  2010-10-26  2:44 ` [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use Joe Perches
@ 2010-10-26 15:50   ` Dmitry Torokhov
  2010-10-26 23:25     ` Joe Perches
  0 siblings, 1 reply; 33+ messages in thread
From: Dmitry Torokhov @ 2010-10-26 15:50 UTC (permalink / raw)
  To: Joe Perches; +Cc: Jiri Kosina, linux-input, linux-kernel

Hi Joe,

On Mon, Oct 25, 2010 at 07:44:24PM -0700, Joe Perches wrote:
> Standardized message logging prefixes.
> Removed \n from dbg macro, added \n to each dbg call site.

Did you test it? It looks for call like:

> +             dbg("%02x <- i8042 (flush, %s)\n",
> +                 data, str & I8042_STR_AUXDATA ? "aux" : "kbd");

the result will be:

printk(KERN_DEBUG "i8042: %02x <- i8042 (flush, %s)\n [%d]", ...)

which is not exactly what you want...

>  
> @@ -1268,7 +1262,7 @@ static void __init i8042_register_ports(void)
>  
>  	for (i = 0; i < I8042_NUM_PORTS; i++) {
>  		if (i8042_ports[i].serio) {
> -			printk(KERN_INFO "serio: %s at %#lx,%#lx irq %d\n",
> +			pr_info("%s at %#lx,%#lx irq %d\n",
>  				i8042_ports[i].serio->name,
>  				(unsigned long) I8042_DATA_REG,
>  				(unsigned long) I8042_COMMAND_REG,

Not quite equivalent conversion, right now every port is registered with
message "serio: XXX at YYY". I would be OK with having driver prefix
going in front but I'd like to keep word serio in (like "i8042: serio
XXX at YYY").

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 05/10] drivers/input/mouse/appletouch.c: Remove KERN_DEBUG use from dprintk
  2010-10-26  2:44   ` Joe Perches
@ 2010-10-26 15:52     ` Dmitry Torokhov
  -1 siblings, 0 replies; 33+ messages in thread
From: Dmitry Torokhov @ 2010-10-26 15:52 UTC (permalink / raw)
  To: Joe Perches; +Cc: Jiri Kosina, Alessandro Rubini, linux-input, linux-kernel

On Mon, Oct 25, 2010 at 07:44:23PM -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>

Applied, thanks Joe.

> ---
>  drivers/input/mouse/appletouch.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
> index a9cf768..b77f999 100644
> --- a/drivers/input/mouse/appletouch.c
> +++ b/drivers/input/mouse/appletouch.c
> @@ -630,7 +630,7 @@ static void atp_complete_geyser_3_4(struct urb *urb)
>  	/* Just update the base values (i.e. touchpad in untouched state) */
>  	if (dev->data[dev->info->datalen - 1] & ATP_STATUS_BASE_UPDATE) {
>  
> -		dprintk(KERN_DEBUG "appletouch: updated base values\n");
> +		dprintk("appletouch: updated base values\n");
>  
>  		memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old));
>  		goto exit;
> -- 
> 1.7.3.dirty
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 05/10] drivers/input/mouse/appletouch.c: Remove KERN_DEBUG use from dprintk
@ 2010-10-26 15:52     ` Dmitry Torokhov
  0 siblings, 0 replies; 33+ messages in thread
From: Dmitry Torokhov @ 2010-10-26 15:52 UTC (permalink / raw)
  To: Joe Perches; +Cc: Jiri Kosina, Alessandro Rubini, linux-input, linux-kernel

On Mon, Oct 25, 2010 at 07:44:23PM -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>

Applied, thanks Joe.

> ---
>  drivers/input/mouse/appletouch.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
> index a9cf768..b77f999 100644
> --- a/drivers/input/mouse/appletouch.c
> +++ b/drivers/input/mouse/appletouch.c
> @@ -630,7 +630,7 @@ static void atp_complete_geyser_3_4(struct urb *urb)
>  	/* Just update the base values (i.e. touchpad in untouched state) */
>  	if (dev->data[dev->info->datalen - 1] & ATP_STATUS_BASE_UPDATE) {
>  
> -		dprintk(KERN_DEBUG "appletouch: updated base values\n");
> +		dprintk("appletouch: updated base values\n");
>  
>  		memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old));
>  		goto exit;
> -- 
> 1.7.3.dirty
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 04/10] drivers/infiniband: Remove unnecessary KERN_<level> uses
  2010-10-26  2:44 ` [PATCH 04/10] drivers/infiniband: Remove unnecessary KERN_<level> uses Joe Perches
@ 2010-10-26 20:46       ` Roland Dreier
  0 siblings, 0 replies; 33+ messages in thread
From: Roland Dreier @ 2010-10-26 20:46 UTC (permalink / raw)
  To: Joe Perches
  Cc: Jiri Kosina, Tom Tucker, Steve Wise, Roland Dreier, Sean Hefty,
	Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

I seemed to already have the amso1100 part, but I picked up the
cxgb3/cxgb4 parts.

 - R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 04/10] drivers/infiniband: Remove unnecessary KERN_<level> uses
@ 2010-10-26 20:46       ` Roland Dreier
  0 siblings, 0 replies; 33+ messages in thread
From: Roland Dreier @ 2010-10-26 20:46 UTC (permalink / raw)
  To: Joe Perches
  Cc: Jiri Kosina, Tom Tucker, Steve Wise, Roland Dreier, Sean Hefty,
	Hal Rosenstock, linux-rdma, linux-kernel

I seemed to already have the amso1100 part, but I picked up the
cxgb3/cxgb4 parts.

 - R.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use
  2010-10-26 15:50   ` Dmitry Torokhov
@ 2010-10-26 23:25     ` Joe Perches
  2010-10-27  0:40       ` Dmitry Torokhov
  0 siblings, 1 reply; 33+ messages in thread
From: Joe Perches @ 2010-10-26 23:25 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Jiri Kosina, linux-input, linux-kernel

On Tue, 2010-10-26 at 08:50 -0700, Dmitry Torokhov wrote:
> Hi Joe,

Hi Dmitry.

> On Mon, Oct 25, 2010 at 07:44:24PM -0700, Joe Perches wrote:
> > Standardized message logging prefixes.
> > Removed \n from dbg macro, added \n to each dbg call site.
> Did you test it? It looks for call like:
> > +             dbg("%02x <- i8042 (flush, %s)\n",
> > +                 data, str & I8042_STR_AUXDATA ? "aux" : "kbd");
> the result will be:
> printk(KERN_DEBUG "i8042: %02x <- i8042 (flush, %s)\n [%d]", ...)
> which is not exactly what you want...

Right.  My mistake.
I compile tested only and didn't notice the badly formed string.

Mind if I move the time to the front like this?

+#define dbg(format, arg...)                                            \
+do {									\
+	if (i8042_debug)						\
+		printk(KERN_DEBUG KBUILD_MODNAME ": [%d]" format),	\
+                      (int)(jiffies - i8042_start_time), ##arg);	\
+} while (0)

> >  
> > @@ -1268,7 +1262,7 @@ static void __init i8042_register_ports(void)
> >  
> >  	for (i = 0; i < I8042_NUM_PORTS; i++) {
> >  		if (i8042_ports[i].serio) {
> > -			printk(KERN_INFO "serio: %s at %#lx,%#lx irq %d\n",
> > +			pr_info("%s at %#lx,%#lx irq %d\n",
> >  				i8042_ports[i].serio->name,
> >  				(unsigned long) I8042_DATA_REG,
> >  				(unsigned long) I8042_COMMAND_REG,
> 
> Not quite equivalent conversion, right now every port is registered with
> message "serio: XXX at YYY". I would be OK with having driver prefix
> going in front but I'd like to keep word serio in (like "i8042: serio
> XXX at YYY").

I'll resubmit a pr_<level> series for drivers/input/serio
today/tomorrow with this change.

cheers, Joe


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use
  2010-10-26 23:25     ` Joe Perches
@ 2010-10-27  0:40       ` Dmitry Torokhov
  2010-10-27  0:46         ` Joe Perches
  0 siblings, 1 reply; 33+ messages in thread
From: Dmitry Torokhov @ 2010-10-27  0:40 UTC (permalink / raw)
  To: Joe Perches; +Cc: Jiri Kosina, linux-input, linux-kernel

On Tuesday, October 26, 2010 04:25:31 pm Joe Perches wrote:
> On Tue, 2010-10-26 at 08:50 -0700, Dmitry Torokhov wrote:
> > Hi Joe,
> 
> Hi Dmitry.
> 
> > On Mon, Oct 25, 2010 at 07:44:24PM -0700, Joe Perches wrote:
> > > Standardized message logging prefixes.
> > > Removed \n from dbg macro, added \n to each dbg call site.
> > 
> > Did you test it? It looks for call like:
> > > +             dbg("%02x <- i8042 (flush, %s)\n",
> > > +                 data, str & I8042_STR_AUXDATA ? "aux" : "kbd");
> > 
> > the result will be:
> > printk(KERN_DEBUG "i8042: %02x <- i8042 (flush, %s)\n [%d]", ...)
> > which is not exactly what you want...
> 
> Right.  My mistake.
> I compile tested only and didn't notice the badly formed string.
> 
> Mind if I move the time to the front like this?
> 
> +#define dbg(format, arg...)                                            \
> +do {									\
> +	if (i8042_debug)						\
> +		printk(KERN_DEBUG KBUILD_MODNAME ": [%d]" format),	\
> +                      (int)(jiffies - i8042_start_time), ##arg);	\
> +} while (0)

Another option would be to leave '\n' in dbg() and leave most of the
callers as is.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use
  2010-10-27  0:40       ` Dmitry Torokhov
@ 2010-10-27  0:46         ` Joe Perches
  2010-10-27  1:00           ` Dmitry Torokhov
  0 siblings, 1 reply; 33+ messages in thread
From: Joe Perches @ 2010-10-27  0:46 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Jiri Kosina, linux-input, linux-kernel

On Tue, 2010-10-26 at 17:40 -0700, Dmitry Torokhov wrote:
> > Mind if I move the time to the front like this?
> > +#define dbg(format, arg...)                                            \
> > +do {									\
> > +	if (i8042_debug)						\
> > +		printk(KERN_DEBUG KBUILD_MODNAME ": [%d]" format),	\
> > +                      (int)(jiffies - i8042_start_time), ##arg);	\
> > +} while (0)
> Another option would be to leave '\n' in dbg() and leave most of the
> callers as is.

That's really error prone though.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use
  2010-10-27  0:46         ` Joe Perches
@ 2010-10-27  1:00           ` Dmitry Torokhov
  2010-10-27  1:10             ` Joe Perches
  0 siblings, 1 reply; 33+ messages in thread
From: Dmitry Torokhov @ 2010-10-27  1:00 UTC (permalink / raw)
  To: Joe Perches; +Cc: Jiri Kosina, linux-input, linux-kernel

On Oct 26, 2010, at 5:46 PM, Joe Perches <joe@perches.com> wrote:

> On Tue, 2010-10-26 at 17:40 -0700, Dmitry Torokhov wrote:
>>> Mind if I move the time to the front like this?
>>> +#define dbg(format, arg...)                                            \
>>> +do {                                    \
>>> +    if (i8042_debug)                        \
>>> +        printk(KERN_DEBUG KBUILD_MODNAME ": [%d]" format),    \
>>> +                      (int)(jiffies - i8042_start_time), ##arg);    \
>>> +} while (0)
>> Another option would be to leave '\n' in dbg() and leave most of the
>> callers as is.
> 
> That's really error prone though.
> 

In what way?

-- 
Dmitry


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use
  2010-10-27  1:00           ` Dmitry Torokhov
@ 2010-10-27  1:10             ` Joe Perches
  2010-10-27  1:28               ` Dmitry Torokhov
  0 siblings, 1 reply; 33+ messages in thread
From: Joe Perches @ 2010-10-27  1:10 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Jiri Kosina, linux-input, linux-kernel

On Tue, 2010-10-26 at 18:00 -0700, Dmitry Torokhov wrote:
> On Oct 26, 2010, at 5:46 PM, Joe Perches <joe@perches.com> wrote:
> > On Tue, 2010-10-26 at 17:40 -0700, Dmitry Torokhov wrote:
> >>> Mind if I move the time to the front like this?
> >>> +#define dbg(format, arg...)                                            \
> >>> +do {                                    \
> >>> +    if (i8042_debug)                        \
> >>> +        printk(KERN_DEBUG KBUILD_MODNAME ": [%d]" format),    \
> >>> +                      (int)(jiffies - i8042_start_time), ##arg);    \
> >>> +} while (0)
> >> Another option would be to leave '\n' in dbg() and leave most of the
> >> callers as is.
> > That's really error prone though.
> In what way?

$ grep -w dbg drivers/input/serio/i8042.c | cat -n
     1			dbg("%02x <- i8042 (flush, %s)", data,
     2		dbg("%02x -> i8042 (command)", command & 0xff);
     3			dbg("%02x -> i8042 (parameter)", param[i]);
     4				dbg("     -- i8042 (timeout)");
     5				dbg("     -- i8042 (auxerr)");
     6			dbg("%02x <- i8042 (return)", param[i]);
     7			dbg("%02x -> i8042 (kbd-data)", c);
     8				dbg("Extra keyboard ACK - filtered out\n");
     9			dbg("Filtered out by platform filter\n");
    10			if (irq) dbg("Interrupt %d, without any data", irq);
    11				dbg("MUX error, status is %02x, data is %02x", str, data);
    12		dbg("%02x <- i8042 (interrupt, %d, %d%s%s)",
    13			dbg("%02x <- i8042 (aux_test_irq, %s)",
    14			dbg("     -- i8042 (aux irq test timeout)");
    15		dbg("%02x -> i8042 (panic blink)", 0xed);
    16		dbg("%02x -> i8042 (panic blink)", led);

I think 2 defects in 16 uses is a pretty high error rate.



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use
  2010-10-27  1:10             ` Joe Perches
@ 2010-10-27  1:28               ` Dmitry Torokhov
  2010-10-27  1:35                 ` Joe Perches
  0 siblings, 1 reply; 33+ messages in thread
From: Dmitry Torokhov @ 2010-10-27  1:28 UTC (permalink / raw)
  To: Joe Perches; +Cc: Jiri Kosina, linux-input, linux-kernel

On Oct 26, 2010, at 6:10 PM, Joe Perches <joe@perches.com> wrote:

> On Tue, 2010-10-26 at 18:00 -0700, Dmitry Torokhov wrote:
>> On Oct 26, 2010, at 5:46 PM, Joe Perches <joe@perches.com> wrote:
>>> On Tue, 2010-10-26 at 17:40 -0700, Dmitry Torokhov wrote:
>>>>> Mind if I move the time to the front like this?
>>>>> +#define dbg(format, arg...)                                            \
>>>>> +do {                                    \
>>>>> +    if (i8042_debug)                        \
>>>>> +        printk(KERN_DEBUG KBUILD_MODNAME ": [%d]" format),    \
>>>>> +                      (int)(jiffies - i8042_start_time), ##arg);    \
>>>>> +} while (0)
>>>> Another option would be to leave '\n' in dbg() and leave most of the
>>>> callers as is.
>>> That's really error prone though.
>> In what way?
> 
> $ grep -w dbg drivers/input/serio/i8042.c | cat -n
>     1            dbg("%02x <- i8042 (flush, %s)", data,
>     2        dbg("%02x -> i8042 (command)", command & 0xff);
>     3            dbg("%02x -> i8042 (parameter)", param[i]);
>     4                dbg("     -- i8042 (timeout)");
>     5                dbg("     -- i8042 (auxerr)");
>     6            dbg("%02x <- i8042 (return)", param[i]);
>     7            dbg("%02x -> i8042 (kbd-data)", c);
>     8                dbg("Extra keyboard ACK - filtered out\n");
>     9            dbg("Filtered out by platform filter\n");
>    10            if (irq) dbg("Interrupt %d, without any data", irq);
>    11                dbg("MUX error, status is %02x, data is %02x", str, data);
>    12        dbg("%02x <- i8042 (interrupt, %d, %d%s%s)",
>    13            dbg("%02x <- i8042 (aux_test_irq, %s)",
>    14            dbg("     -- i8042 (aux irq test timeout)");
>    15        dbg("%02x -> i8042 (panic blink)", 0xed);
>    16        dbg("%02x -> i8042 (panic blink)", led);
> 
> I think 2 defects in 16 uses is a pretty high error rate.

But how not adding /n is it much better than having it if some later change will forget to add it to the message?

-- 
Dmitry



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use
  2010-10-27  1:28               ` Dmitry Torokhov
@ 2010-10-27  1:35                 ` Joe Perches
  2010-10-27  3:00                   ` Dmitry Torokhov
  0 siblings, 1 reply; 33+ messages in thread
From: Joe Perches @ 2010-10-27  1:35 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Jiri Kosina, linux-input, linux-kernel

On Tue, 2010-10-26 at 18:28 -0700, Dmitry Torokhov wrote:
> On Oct 26, 2010, at 6:10 PM, Joe Perches <joe@perches.com> wrote:
> > I think 2 defects in 16 uses is a pretty high error rate.
> But how not adding /n is it much better than having it if
> some later change will forget to add it to the message?

Adding \n is the default kernel style.

USB uses a similar dbg macro with a relatively
high error rate.

I fixed some in this commit below awhile ago,
but these keep creeping back in, so they _are_
error prone in actual use.

commit 759f3634267a67ac90f3fa7fc06510dfd43b4e45
Author: Joe Perches <joe@perches.com>
Date:   Fri Feb 5 16:50:08 2010 -0800

    USB: serial: Remove unnecessary \n's from dbg uses
    
    #define dbg adds the newline, messages shouldn't.
    Converted dbg("%s", "some string") to dbg("some string")
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use
  2010-10-27  1:35                 ` Joe Perches
@ 2010-10-27  3:00                   ` Dmitry Torokhov
  0 siblings, 0 replies; 33+ messages in thread
From: Dmitry Torokhov @ 2010-10-27  3:00 UTC (permalink / raw)
  To: Joe Perches; +Cc: Jiri Kosina, linux-input, linux-kernel

On Tue, Oct 26, 2010 at 06:35:45PM -0700, Joe Perches wrote:
> On Tue, 2010-10-26 at 18:28 -0700, Dmitry Torokhov wrote:
> > On Oct 26, 2010, at 6:10 PM, Joe Perches <joe@perches.com> wrote:
> > > I think 2 defects in 16 uses is a pretty high error rate.
> > But how not adding /n is it much better than having it if
> > some later change will forget to add it to the message?
> 
> Adding \n is the default kernel style.
> 
> USB uses a similar dbg macro with a relatively
> high error rate.
> 
> I fixed some in this commit below awhile ago,
> but these keep creeping back in, so they _are_
> error prone in actual use.
> 

OK, fair enough.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 09/10] drivers/video/msm/mddi.c: Remove multiple KERN_<level> uses
  2010-10-26  2:44 ` [PATCH 09/10] drivers/video/msm/mddi.c: Remove multiple KERN_<level> uses Joe Perches
@ 2010-10-28 17:08   ` Daniel Walker
  0 siblings, 0 replies; 33+ messages in thread
From: Daniel Walker @ 2010-10-28 17:08 UTC (permalink / raw)
  To: Joe Perches
  Cc: Jiri Kosina, David Brown, Bryan Huntsman, linux-arm-msm, linux-kernel

On Mon, 2010-10-25 at 19:44 -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/video/msm/mddi.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/msm/mddi.c b/drivers/video/msm/mddi.c
> index 7c316c3..b66d86a 100644
> --- a/drivers/video/msm/mddi.c
> +++ b/drivers/video/msm/mddi.c
> @@ -318,7 +318,7 @@ static long mddi_wait_interrupt_timeout(struct mddi_info *mddi,
>  static void mddi_wait_interrupt(struct mddi_info *mddi, uint32_t intmask)
>  {
>  	if (mddi_wait_interrupt_timeout(mddi, intmask, HZ/10) == 0)
> -		printk(KERN_INFO KERN_ERR "mddi_wait_interrupt %d, timeout "
> +		printk(KERN_INFO "mddi_wait_interrupt %d, timeout "
>  		       "waiting for %x, INT = %x, STAT = %x gotint = %x\n",
>  		       current->pid, intmask, mddi_readl(INT), mddi_readl(STAT),
>  		       mddi->got_int);
> @@ -465,8 +465,7 @@ static int __init mddi_get_client_caps(struct mddi_info *mddi)
>  
>  		if (mddi->flags & FLAG_HAVE_CAPS)
>  			break;
> -		printk(KERN_INFO KERN_ERR "mddi_init, timeout waiting for "
> -				"caps\n");
> +		printk(KERN_INFO "mddi_init, timeout waiting for caps\n");
>  	}
>  	return mddi->flags & FLAG_HAVE_CAPS;
>  }

Applied to my tree, thanks.

Daniel

-- 

Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 03/10] drivers/hid/hid-input.c: Remove KERN_DEBUG from dbg_hid use
  2010-10-26  2:44 ` [PATCH 03/10] drivers/hid/hid-input.c: Remove KERN_DEBUG from dbg_hid use Joe Perches
@ 2010-11-03 14:13   ` Jiri Kosina
  0 siblings, 0 replies; 33+ messages in thread
From: Jiri Kosina @ 2010-11-03 14:13 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-input, linux-kernel

On Mon, 25 Oct 2010, Joe Perches wrote:

> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/hid/hid-input.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index bb0b365..3a1517a 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -174,7 +174,7 @@ static int hidinput_setkeycode(struct input_dev *dev,
>  
>  		clear_bit(*old_keycode, dev->keybit);
>  		set_bit(usage->code, dev->keybit);
> -		dbg_hid(KERN_DEBUG "Assigned keycode %d to HID usage code %x\n",
> +		dbg_hid("Assigned keycode %d to HID usage code %x\n",
>  			usage->code, usage->hid);
>  
>  		/*

Applied to HID tree, thanks.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2010-11-03 14:13 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-26  2:44 [PATCH 00/10] Remove multiple uses of KERN_<level> Joe Perches
2010-10-26  2:44 ` Joe Perches
2010-10-26  2:44 ` Joe Perches
2010-10-26  2:44 ` [PATCH 01/10] arch/x86/kernel/apic/io_apic.c: Typo fix WARNING Joe Perches
2010-10-26  7:48   ` Ingo Molnar
2010-10-26  8:23     ` Joe Perches
2010-10-26  2:44 ` [PATCH 02/10] drivers/atm/eni.c: Remove multiple uses of KERN_<level> Joe Perches
2010-10-26  2:44 ` [PATCH 03/10] drivers/hid/hid-input.c: Remove KERN_DEBUG from dbg_hid use Joe Perches
2010-11-03 14:13   ` Jiri Kosina
2010-10-26  2:44 ` [PATCH 04/10] drivers/infiniband: Remove unnecessary KERN_<level> uses Joe Perches
     [not found]   ` <a62c334347cbfbaf5c5acb29c2ae7acda84344a0.1288059486.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2010-10-26 11:29     ` Steve Wise
2010-10-26 11:29       ` Steve Wise
2010-10-26 20:46     ` Roland Dreier
2010-10-26 20:46       ` Roland Dreier
2010-10-26  2:44 ` [PATCH 05/10] drivers/input/mouse/appletouch.c: Remove KERN_DEBUG use from dprintk Joe Perches
2010-10-26  2:44   ` Joe Perches
2010-10-26 15:52   ` Dmitry Torokhov
2010-10-26 15:52     ` Dmitry Torokhov
2010-10-26  2:44 ` [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use Joe Perches
2010-10-26 15:50   ` Dmitry Torokhov
2010-10-26 23:25     ` Joe Perches
2010-10-27  0:40       ` Dmitry Torokhov
2010-10-27  0:46         ` Joe Perches
2010-10-27  1:00           ` Dmitry Torokhov
2010-10-27  1:10             ` Joe Perches
2010-10-27  1:28               ` Dmitry Torokhov
2010-10-27  1:35                 ` Joe Perches
2010-10-27  3:00                   ` Dmitry Torokhov
2010-10-26  2:44 ` [PATCH 07/10] drivers/media: Removed unnecessary KERN_<level>s from dprintk uses Joe Perches
2010-10-26  2:44 ` [PATCH 08/10] drivers/scsi:mvsas/mv_sas.c: Remove KERN_DEBUG from mv_dprintk use Joe Perches
2010-10-26  2:44 ` [PATCH 09/10] drivers/video/msm/mddi.c: Remove multiple KERN_<level> uses Joe Perches
2010-10-28 17:08   ` Daniel Walker
2010-10-26  2:44 ` [PATCH 10/10] fs/proc/vmcore.c: Use pr_<level> and pr_<fmt> Joe Perches

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.