* [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug
@ 2009-05-15 17:59 Joe Perches
2009-05-15 17:59 ` [PATCH 01/11] arch/arm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug( Joe Perches
` (10 more replies)
0 siblings, 11 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel
From: Joe Perches <joe@perches.com>
Remove unnecessary #ifdef DEBUG/#endif pairs
with trivial conversions of:
#ifdef DEBUG
printk(KERN_DEBUG foo);
#endif
to:
pr_debug(foo);
Signed-off-by: Joe Perches <joe@perches.com>
Joe Perches (11):
arch/arm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
arch/h8300: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
arch/m68knommu: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
arch/powerpc: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
arch/um: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
drivers/isdn: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
drivers/macintosh: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
drivers/net: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
drivers/scsi: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
fs/efs: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
arch/arm/mach-omap1/id.c | 26 +++++++++----------
arch/h8300/kernel/setup.c | 24 +++++++----------
arch/h8300/mm/init.c | 4 +--
arch/m68knommu/kernel/setup.c | 16 +++++------
arch/m68knommu/mm/init.c | 4 +--
arch/powerpc/platforms/pseries/eeh_cache.c | 6 +---
arch/um/drivers/hostaudio_kern.c | 38 ++++++++-------------------
drivers/isdn/i4l/isdn_bsdcomp.c | 4 +--
drivers/isdn/pcbit/callbacks.c | 9 +-----
drivers/isdn/pcbit/capi.c | 16 +++---------
drivers/isdn/pcbit/drv.c | 30 ++++++---------------
drivers/isdn/pcbit/layer2.c | 30 ++++++---------------
drivers/macintosh/ans-lcd.c | 16 +++---------
drivers/net/tc35815.c | 13 +++------
drivers/scsi/aha1542.c | 8 +----
fs/efs/dir.c | 5 +--
fs/efs/inode.c | 14 +++-------
mm/oom_kill.c | 6 +---
18 files changed, 88 insertions(+), 181 deletions(-)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 01/11] arch/arm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
@ 2009-05-15 17:59 ` Joe Perches
2009-05-15 17:59 ` [PATCH 02/11] arch/h8300: " Joe Perches
` (9 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel; +Cc: Russell King, Tony Lindgren
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/arm/mach-omap1/id.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index 4ef26fa..f72a221 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -130,20 +130,18 @@ void __init omap_check_revision(void)
die_rev = omap_get_die_rev();
omap_id = omap_readl(OMAP32_ID_0);
-#ifdef DEBUG
- printk(KERN_DEBUG "OMAP_DIE_ID_0: 0x%08x\n", omap_readl(OMAP_DIE_ID_0));
- printk(KERN_DEBUG "OMAP_DIE_ID_1: 0x%08x DIE_REV: %i\n",
- omap_readl(OMAP_DIE_ID_1),
- (omap_readl(OMAP_DIE_ID_1) >> 17) & 0xf);
- printk(KERN_DEBUG "OMAP_PRODUCTION_ID_0: 0x%08x\n",
- omap_readl(OMAP_PRODUCTION_ID_0));
- printk(KERN_DEBUG "OMAP_PRODUCTION_ID_1: 0x%08x JTAG_ID: 0x%04x\n",
- omap_readl(OMAP_PRODUCTION_ID_1),
- omap_readl(OMAP_PRODUCTION_ID_1) & 0xffff);
- printk(KERN_DEBUG "OMAP32_ID_0: 0x%08x\n", omap_readl(OMAP32_ID_0));
- printk(KERN_DEBUG "OMAP32_ID_1: 0x%08x\n", omap_readl(OMAP32_ID_1));
- printk(KERN_DEBUG "JTAG_ID: 0x%04x DIE_REV: %i\n", jtag_id, die_rev);
-#endif
+ pr_debug("OMAP_DIE_ID_0: 0x%08x\n", omap_readl(OMAP_DIE_ID_0));
+ pr_debug("OMAP_DIE_ID_1: 0x%08x DIE_REV: %i\n",
+ omap_readl(OMAP_DIE_ID_1),
+ (omap_readl(OMAP_DIE_ID_1) >> 17) & 0xf);
+ pr_debug("OMAP_PRODUCTION_ID_0: 0x%08x\n",
+ omap_readl(OMAP_PRODUCTION_ID_0));
+ pr_debug("OMAP_PRODUCTION_ID_1: 0x%08x JTAG_ID: 0x%04x\n",
+ omap_readl(OMAP_PRODUCTION_ID_1),
+ omap_readl(OMAP_PRODUCTION_ID_1) & 0xffff);
+ pr_debug("OMAP32_ID_0: 0x%08x\n", omap_readl(OMAP32_ID_0));
+ pr_debug("OMAP32_ID_1: 0x%08x\n", omap_readl(OMAP32_ID_1));
+ pr_debug("JTAG_ID: 0x%04x DIE_REV: %i\n", jtag_id, die_rev);
system_serial_high = omap_readl(OMAP_DIE_ID_0);
system_serial_low = omap_readl(OMAP_DIE_ID_1);
--
1.6.3.1.9.g95405b.dirty
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 02/11] arch/h8300: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
2009-05-15 17:59 ` [PATCH 01/11] arch/arm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug( Joe Perches
@ 2009-05-15 17:59 ` Joe Perches
2009-05-15 17:59 ` [PATCH 03/11] arch/m68knommu: " Joe Perches
` (8 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/h8300/kernel/setup.c | 24 ++++++++++--------------
arch/h8300/mm/init.c | 4 +---
2 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
index 7fda657..9d17c40 100644
--- a/arch/h8300/kernel/setup.c
+++ b/arch/h8300/kernel/setup.c
@@ -133,17 +133,15 @@ void __init setup_arch(char **cmdline_p)
printk(KERN_INFO "Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n");
printk(KERN_INFO "H8/300 series support by Yoshinori Sato <ysato@users.sourceforge.jp>\n");
-#ifdef DEBUG
- printk(KERN_DEBUG "KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
- "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
- (int) &_sdata, (int) &_edata,
- (int) &_sbss, (int) &_ebss);
- printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x "
- "STACK=0x%06x-0x%06x\n",
- (int) &_ebss, (int) memory_start,
- (int) memory_start, (int) memory_end,
- (int) memory_end, (int) &_ramend);
-#endif
+ pr_debug("KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
+ "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
+ (int) &_sdata, (int) &_edata,
+ (int) &_sbss, (int) &_ebss);
+ pr_debug("KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x "
+ "STACK=0x%06x-0x%06x\n",
+ (int) &_ebss, (int) memory_start,
+ (int) memory_start, (int) memory_end,
+ (int) memory_end, (int) &_ramend);
#ifdef CONFIG_DEFAULT_CMDLINE
/* set from default command line */
@@ -190,9 +188,7 @@ void __init setup_arch(char **cmdline_p)
*cscr |= (AREABIT(CONFIG_H8300_IDE_BASE) | AREABIT(CONFIG_H8300_IDE_ALT)) | 0x0f;
}
#endif
-#ifdef DEBUG
- printk(KERN_DEBUG "Done setup_arch\n");
-#endif
+ pr_debug("Done setup_arch\n");
}
/*
diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c
index 9942f24..61a3977 100644
--- a/arch/h8300/mm/init.c
+++ b/arch/h8300/mm/init.c
@@ -130,9 +130,7 @@ void __init mem_init(void)
unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */
unsigned long end_mem = memory_end; /* DAVIDM - this must not include kernel stack at top */
-#ifdef DEBUG
- printk(KERN_DEBUG "Mem_init: start=%lx, end=%lx\n", start_mem, end_mem);
-#endif
+ pr_debug("Mem_init: start=%lx, end=%lx\n", start_mem, end_mem);
end_mem &= PAGE_MASK;
high_memory = (void *) end_mem;
--
1.6.3.1.9.g95405b.dirty
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 03/11] arch/m68knommu: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
2009-05-15 17:59 ` [PATCH 01/11] arch/arm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug( Joe Perches
2009-05-15 17:59 ` [PATCH 02/11] arch/h8300: " Joe Perches
@ 2009-05-15 17:59 ` Joe Perches
2009-05-18 1:33 ` Greg Ungerer
2009-05-15 17:59 ` [PATCH 04/11] arch/powerpc: " Joe Perches
` (7 subsequent siblings)
10 siblings, 1 reply; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Ungerer
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/m68knommu/kernel/setup.c | 16 +++++++---------
arch/m68knommu/mm/init.c | 4 +---
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 5985f19..5c2bb3e 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -166,15 +166,13 @@ void __init setup_arch(char **cmdline_p)
printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)\n");
#endif
-#ifdef DEBUG
- printk(KERN_DEBUG "KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
- "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
- (int) &_sdata, (int) &_edata,
- (int) &_sbss, (int) &_ebss);
- printk(KERN_DEBUG "MEMORY -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ",
- (int) &_ebss, (int) memory_start,
- (int) memory_start, (int) memory_end);
-#endif
+ pr_debug("KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
+ "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
+ (int) &_sdata, (int) &_edata,
+ (int) &_sbss, (int) &_ebss);
+ pr_debug("MEMORY -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ",
+ (int) &_ebss, (int) memory_start,
+ (int) memory_start, (int) memory_end);
/* Keep a copy of command line */
*cmdline_p = &command_line[0];
diff --git a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c
index 7befc0c..b1703c6 100644
--- a/arch/m68knommu/mm/init.c
+++ b/arch/m68knommu/mm/init.c
@@ -126,9 +126,7 @@ void __init mem_init(void)
unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */
unsigned long end_mem = memory_end; /* DAVIDM - this must not include kernel stack at top */
-#ifdef DEBUG
- printk(KERN_DEBUG "Mem_init: start=%lx, end=%lx\n", start_mem, end_mem);
-#endif
+ pr_debug("Mem_init: start=%lx, end=%lx\n", start_mem, end_mem);
end_mem &= PAGE_MASK;
high_memory = (void *) end_mem;
--
1.6.3.1.9.g95405b.dirty
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 04/11] arch/powerpc: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
` (2 preceding siblings ...)
2009-05-15 17:59 ` [PATCH 03/11] arch/m68knommu: " Joe Perches
@ 2009-05-15 17:59 ` Joe Perches
2009-05-15 17:59 ` [PATCH 05/11] arch/um: " Joe Perches
` (6 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/powerpc/platforms/pseries/eeh_cache.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c
index ce37040..eb355f1 100644
--- a/arch/powerpc/platforms/pseries/eeh_cache.c
+++ b/arch/powerpc/platforms/pseries/eeh_cache.c
@@ -163,10 +163,8 @@ pci_addr_cache_insert(struct pci_dev *dev, unsigned long alo,
piar->pcidev = dev;
piar->flags = flags;
-#ifdef DEBUG
- printk(KERN_DEBUG "PIAR: insert range=[%lx:%lx] dev=%s\n",
- alo, ahi, pci_name (dev));
-#endif
+ pr_debug("PIAR: insert range=[%lx:%lx] dev=%s\n",
+ alo, ahi, pci_name (dev));
rb_link_node(&piar->rb_node, parent, p);
rb_insert_color(&piar->rb_node, &pci_io_addr_cache_root.rb_root);
--
1.6.3.1.9.g95405b.dirty
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 05/11] arch/um: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
` (3 preceding siblings ...)
2009-05-15 17:59 ` [PATCH 04/11] arch/powerpc: " Joe Perches
@ 2009-05-15 17:59 ` Joe Perches
2009-05-15 17:59 ` [PATCH 06/11] drivers/isdn: " Joe Perches
` (5 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel; +Cc: user-mode-linux-user, user-mode-linux-devel, Jeff Dike
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/um/drivers/hostaudio_kern.c | 38 +++++++++++---------------------------
1 files changed, 11 insertions(+), 27 deletions(-)
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c
index 368219c..2f5b343 100644
--- a/arch/um/drivers/hostaudio_kern.c
+++ b/arch/um/drivers/hostaudio_kern.c
@@ -75,9 +75,7 @@ static ssize_t hostaudio_read(struct file *file, char __user *buffer,
void *kbuf;
int err;
-#ifdef DEBUG
- printk(KERN_DEBUG "hostaudio: read called, count = %d\n", count);
-#endif
+ pr_debug("hostaudio: read called, count = %d\n", count);
kbuf = kmalloc(count, GFP_KERNEL);
if (kbuf == NULL)
@@ -102,9 +100,7 @@ static ssize_t hostaudio_write(struct file *file, const char __user *buffer,
void *kbuf;
int err;
-#ifdef DEBUG
- printk(KERN_DEBUG "hostaudio: write called, count = %d\n", count);
-#endif
+ pr_debug("hostaudio: write called, count = %d\n", count);
kbuf = kmalloc(count, GFP_KERNEL);
if (kbuf == NULL)
@@ -129,9 +125,7 @@ static unsigned int hostaudio_poll(struct file *file,
{
unsigned int mask = 0;
-#ifdef DEBUG
- printk(KERN_DEBUG "hostaudio: poll called (unimplemented)\n");
-#endif
+ pr_debug("hostaudio: poll called (unimplemented)\n");
return mask;
}
@@ -143,9 +137,8 @@ static int hostaudio_ioctl(struct inode *inode, struct file *file,
unsigned long data = 0;
int err;
-#ifdef DEBUG
- printk(KERN_DEBUG "hostaudio: ioctl called, cmd = %u\n", cmd);
-#endif
+ pr_debug("hostaudio: ioctl called, cmd = %u\n", cmd);
+
switch(cmd){
case SNDCTL_DSP_SPEED:
case SNDCTL_DSP_STEREO:
@@ -185,9 +178,7 @@ static int hostaudio_open(struct inode *inode, struct file *file)
int r = 0, w = 0;
int ret;
-#ifdef DEBUG
- printk(KERN_DEBUG "hostaudio: open called (host: %s)\n", dsp);
-#endif
+ pr_debug("hostaudio: open called (host: %s)\n", dsp);
state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL);
if (state == NULL)
@@ -212,9 +203,8 @@ static int hostaudio_release(struct inode *inode, struct file *file)
{
struct hostaudio_state *state = file->private_data;
-#ifdef DEBUG
- printk(KERN_DEBUG "hostaudio: release called\n");
-#endif
+ pr_debug("hostaudio: release called\n");
+
os_close_file(state->fd);
kfree(state);
@@ -228,9 +218,7 @@ static int hostmixer_ioctl_mixdev(struct inode *inode, struct file *file,
{
struct hostmixer_state *state = file->private_data;
-#ifdef DEBUG
- printk(KERN_DEBUG "hostmixer: ioctl called\n");
-#endif
+ pr_debug("hostmixer: ioctl called\n");
return os_ioctl_generic(state->fd, cmd, arg);
}
@@ -241,9 +229,7 @@ static int hostmixer_open_mixdev(struct inode *inode, struct file *file)
int r = 0, w = 0;
int ret;
-#ifdef DEBUG
- printk(KERN_DEBUG "hostmixer: open called (host: %s)\n", mixer);
-#endif
+ pr_debug("hostmixer: open called (host: %s)\n", mixer);
state = kmalloc(sizeof(struct hostmixer_state), GFP_KERNEL);
if (state == NULL)
@@ -271,9 +257,7 @@ static int hostmixer_release(struct inode *inode, struct file *file)
{
struct hostmixer_state *state = file->private_data;
-#ifdef DEBUG
- printk(KERN_DEBUG "hostmixer: release called\n");
-#endif
+ pr_debug("hostmixer: release called\n");
os_close_file(state->fd);
kfree(state);
--
1.6.3.1.9.g95405b.dirty
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 06/11] drivers/isdn: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
` (4 preceding siblings ...)
2009-05-15 17:59 ` [PATCH 05/11] arch/um: " Joe Perches
@ 2009-05-15 17:59 ` Joe Perches
2009-05-15 17:59 ` [PATCH 07/11] drivers/macintosh: " Joe Perches
` (4 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel; +Cc: Karsten Keil
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/isdn/i4l/isdn_bsdcomp.c | 4 +---
drivers/isdn/pcbit/callbacks.c | 9 ++-------
drivers/isdn/pcbit/capi.c | 16 ++++------------
drivers/isdn/pcbit/drv.c | 30 +++++++++---------------------
drivers/isdn/pcbit/layer2.c | 30 +++++++++---------------------
5 files changed, 25 insertions(+), 64 deletions(-)
diff --git a/drivers/isdn/i4l/isdn_bsdcomp.c b/drivers/isdn/i4l/isdn_bsdcomp.c
index 02d9918..ab77384 100644
--- a/drivers/isdn/i4l/isdn_bsdcomp.c
+++ b/drivers/isdn/i4l/isdn_bsdcomp.c
@@ -769,10 +769,8 @@ static int bsd_decompress (void *state, struct sk_buff *skb_in, struct sk_buff *
if( skb_tailroom(skb_out) < codelen + extra) {
if (db->debug) {
printk(KERN_DEBUG "bsd_decomp%d: ran out of mru\n", db->unit);
-#ifdef DEBUG
- printk(KERN_DEBUG " len=%d, finchar=0x%x, codelen=%d,skblen=%d\n",
+ pr_debug(" len=%d, finchar=0x%x, codelen=%d,skblen=%d\n",
ilen, finchar, codelen, skb_out->len);
-#endif
}
return DECOMP_FATALERROR;
}
diff --git a/drivers/isdn/pcbit/callbacks.c b/drivers/isdn/pcbit/callbacks.c
index 43ecd0f..57a065c 100644
--- a/drivers/isdn/pcbit/callbacks.c
+++ b/drivers/isdn/pcbit/callbacks.c
@@ -48,10 +48,7 @@ void cb_out_1(struct pcbit_dev * dev, struct pcbit_chan* chan,
ushort refnum;
-#ifdef DEBUG
- printk(KERN_DEBUG "Called Party Number: %s\n",
- cbdata->data.setup.CalledPN);
-#endif
+ pr_debug("Called Party Number: %s\n", cbdata->data.setup.CalledPN);
/*
* hdr - kmalloc in capi_conn_req
* - kfree when msg has been sent
@@ -164,9 +161,7 @@ void cb_in_1(struct pcbit_dev * dev, struct pcbit_chan* chan,
ictl.parm.setup.plan = 0;
ictl.parm.setup.screen = 0;
-#ifdef DEBUG
- printk(KERN_DEBUG "statstr: %s\n", ictl.num);
-#endif
+ pr_debug("statstr: %s\n", ictl.num);
dev->dev_if->statcallb(&ictl);
diff --git a/drivers/isdn/pcbit/capi.c b/drivers/isdn/pcbit/capi.c
index ac5a91c..4a812e7 100644
--- a/drivers/isdn/pcbit/capi.c
+++ b/drivers/isdn/pcbit/capi.c
@@ -162,9 +162,7 @@ int capi_conn_active_req(struct pcbit_chan* chan, struct sk_buff **skb)
*((ushort*) skb_put(*skb, 2) ) = chan->callref;
-#ifdef DEBUG
- printk(KERN_DEBUG "Call Reference: %04x\n", chan->callref);
-#endif
+ pr_debug("Call Reference: %04x\n", chan->callref);
*(skb_put(*skb, 1)) = 0; /* BC.Length = 0; */
*(skb_put(*skb, 1)) = 0; /* ConnectedPN.Length = 0 */
@@ -226,9 +224,7 @@ int capi_select_proto_req(struct pcbit_chan *chan, struct sk_buff **skb,
*(skb_put(*skb, 1)) = 0x06;
break;
default:
-#ifdef DEBUG
- printk(KERN_DEBUG "Transparent\n");
-#endif
+ pr_debug("Transparent\n");
*(skb_put(*skb, 1)) = 0x03;
break;
}
@@ -388,9 +384,7 @@ int capi_decode_conn_ind(struct pcbit_chan * chan,
chan->callref = *((ushort*) skb->data);
skb_pull(skb, 2);
-#ifdef DEBUG
- printk(KERN_DEBUG "Call Reference: %04x\n", chan->callref);
-#endif
+ pr_debug("Call Reference: %04x\n", chan->callref);
/* Channel Identification */
@@ -420,9 +414,7 @@ int capi_decode_conn_ind(struct pcbit_chan * chan,
if (len > 0) {
int count = 1;
-#ifdef DEBUG
- printk(KERN_DEBUG "CPN: Octect 3 %02x\n", skb->data[1]);
-#endif
+ pr_debug("CPN: Octect 3 %02x\n", skb->data[1]);
if ((skb->data[1] & 0x80) == 0)
count = 2;
diff --git a/drivers/isdn/pcbit/drv.c b/drivers/isdn/pcbit/drv.c
index 8c66bcb..8ec12b0 100644
--- a/drivers/isdn/pcbit/drv.c
+++ b/drivers/isdn/pcbit/drv.c
@@ -313,9 +313,8 @@ static void pcbit_block_timer(unsigned long data)
del_timer(&chan->block_timer);
chan->block_timer.function = NULL;
-#ifdef DEBUG
- printk(KERN_DEBUG "pcbit_block_timer\n");
-#endif
+ pr_debug("pcbit_block_timer\n");
+
chan->queued = 0;
ictl.driver = dev->id;
ictl.command = ISDN_STAT_BSENT;
@@ -565,11 +564,9 @@ void pcbit_l3_receive(struct pcbit_dev * dev, ulong msg,
* reference number. The current version of the firmware
* doesn't sent the ref number correctly.
*/
-#ifdef DEBUG
- printk(KERN_DEBUG "refnum=%04x b1=%04x b2=%04x\n", refnum,
- dev->b1->s_refnum,
- dev->b2->s_refnum);
-#endif
+ pr_debug("refnum=%04x b1=%04x b2=%04x\n", refnum,
+ dev->b1->s_refnum,
+ dev->b2->s_refnum);
/* We just try to find a channel in the right state */
if (dev->b1->fsm_state == ST_CALL_INIT)
@@ -676,9 +673,7 @@ void pcbit_l3_receive(struct pcbit_dev * dev, ulong msg,
printk(KERN_WARNING "capi_decode_disc_conf - error\n");
break;
case MSG_INFO_IND:
-#ifdef DEBUG
- printk(KERN_DEBUG "received Info Indication - discarded\n");
-#endif
+ pr_debug("received Info Indication - discarded\n");
break;
#ifdef DEBUG
case MSG_DEBUG_188:
@@ -794,9 +789,7 @@ static void set_running_timeout(unsigned long ptr)
{
struct pcbit_dev * dev;
-#ifdef DEBUG
- printk(KERN_DEBUG "set_running_timeout\n");
-#endif
+ pr_debug("set_running_timeout\n");
dev = (struct pcbit_dev *) ptr;
wake_up_interruptible(&dev->set_running_wq);
@@ -847,10 +840,7 @@ static int set_protocol_running(struct pcbit_dev * dev)
dev->l2_state = L2_DOWN;
-#ifdef DEBUG
- printk(KERN_DEBUG "Bank3 = %02x\n",
- readb(dev->sh_mem + BANK3));
-#endif
+ pr_debug("Bank3 = %02x\n", readb(dev->sh_mem + BANK3));
writeb(0x40, dev->sh_mem + BANK4);
/* warn the upper layer */
@@ -1048,9 +1038,7 @@ static void pcbit_set_msn(struct pcbit_dev *dev, char *list)
memcpy(ptr->msn, sp, len - 1);
ptr->msn[len] = 0;
-#ifdef DEBUG
- printk(KERN_DEBUG "msn: %s\n", ptr->msn);
-#endif
+ pr_debug("msn: %s\n", ptr->msn);
if (dev->msn_list == NULL)
dev->msn_list = ptr;
else
diff --git a/drivers/isdn/pcbit/layer2.c b/drivers/isdn/pcbit/layer2.c
index e075e8d..7f3ab02 100644
--- a/drivers/isdn/pcbit/layer2.c
+++ b/drivers/isdn/pcbit/layer2.c
@@ -267,11 +267,9 @@ pcbit_transmit(struct pcbit_dev *dev)
spin_unlock_irqrestore(&dev->lock, flags);
} else {
spin_unlock_irqrestore(&dev->lock, flags);
-#ifdef DEBUG
- printk(KERN_DEBUG "unacked %d free %d write_queue %s\n",
- unacked, dev->free, dev->write_queue ? "not empty" :
- "empty");
-#endif
+ pr_debug("unacked %d free %d write_queue %s\n",
+ unacked, dev->free,
+ dev->write_queue ? "not empty" : "empty");
}
}
@@ -385,20 +383,15 @@ pcbit_receive(struct pcbit_dev *dev)
if (frame->hdr_len == 0) {
kfree(frame);
-#ifdef DEBUG
- printk(KERN_DEBUG "0 sized frame\n");
-#endif
+ pr_debug("0 sized frame\n");
pcbit_firmware_bug(dev);
return;
}
/* sanity check the length values */
if (frame->hdr_len > 1024 || frame->dt_len > 2048) {
-#ifdef DEBUG
- printk(KERN_DEBUG "length problem: ");
- printk(KERN_DEBUG "TH=%04x TD=%04x\n",
- frame->hdr_len,
- frame->dt_len);
-#endif
+ pr_debug("length problem: TH=%04x TD=%04x\n",
+ frame->hdr_len,
+ frame->dt_len);
pcbit_l2_error(dev);
kfree(frame);
return;
@@ -521,9 +514,7 @@ pcbit_irq_handler(int interrupt, void *devptr)
return IRQ_HANDLED;
}
if (info & 0x40U) { /* E bit set */
-#ifdef DEBUG
- printk(KERN_DEBUG "pcbit_irq_handler: E bit on\n");
-#endif
+ pr_debug("pcbit_irq_handler: E bit on\n");
pcbit_l2_error(dev);
dev->interrupt = 0;
return IRQ_HANDLED;
@@ -562,10 +553,7 @@ pcbit_l2_active_conf(struct pcbit_dev *dev, u_char info)
state = dev->l2_state;
-#ifdef DEBUG
- printk(KERN_DEBUG "layer2_active_confirm\n");
-#endif
-
+ pr_debug("layer2_active_confirm\n");
if (info & 0x80U) {
dev->rcv_seq = info & 0x07U;
--
1.6.3.1.9.g95405b.dirty
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 07/11] drivers/macintosh: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
` (5 preceding siblings ...)
2009-05-15 17:59 ` [PATCH 06/11] drivers/isdn: " Joe Perches
@ 2009-05-15 17:59 ` Joe Perches
2009-05-15 17:59 ` [PATCH 08/11] drivers/net: " Joe Perches
` (3 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/macintosh/ans-lcd.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c
index 6a82218..d8b4d75 100644
--- a/drivers/macintosh/ans-lcd.c
+++ b/drivers/macintosh/ans-lcd.c
@@ -32,9 +32,7 @@ static volatile unsigned char __iomem *anslcd_ptr;
static void
anslcd_write_byte_ctrl ( unsigned char c )
{
-#ifdef DEBUG
- printk(KERN_DEBUG "LCD: CTRL byte: %02x\n",c);
-#endif
+ pr_debug("LCD: CTRL byte: %02x\n",c);
out_8(anslcd_ptr + ANSLCD_CTRL_IX, c);
switch(c) {
case 1:
@@ -59,9 +57,7 @@ anslcd_write( struct file * file, const char __user * buf,
const char __user *p = buf;
int i;
-#ifdef DEBUG
- printk(KERN_DEBUG "LCD: write\n");
-#endif
+ pr_debug("LCD: write\n");
if (!access_ok(VERIFY_READ, buf, count))
return -EFAULT;
@@ -81,9 +77,7 @@ anslcd_ioctl( struct inode * inode, struct file * file,
{
char ch, __user *temp;
-#ifdef DEBUG
- printk(KERN_DEBUG "LCD: ioctl(%d,%d)\n",cmd,arg);
-#endif
+ pr_debug("LCD: ioctl(%d,%d)\n",cmd,arg);
switch ( cmd )
{
@@ -164,9 +158,7 @@ anslcd_init(void)
return retval;
}
-#ifdef DEBUG
- printk(KERN_DEBUG "LCD: init\n");
-#endif
+ pr_debug("LCD: init\n");
anslcd_write_byte_ctrl ( 0x38 );
anslcd_write_byte_ctrl ( 0x0c );
--
1.6.3.1.9.g95405b.dirty
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 08/11] drivers/net: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
` (6 preceding siblings ...)
2009-05-15 17:59 ` [PATCH 07/11] drivers/macintosh: " Joe Perches
@ 2009-05-15 17:59 ` Joe Perches
2009-05-15 17:59 ` [PATCH 09/11] drivers/scsi: " Joe Perches
` (2 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel
Cc: netdev, David S. Miller, Atsushi Nemoto, Jeff Garzik,
Neil Horman, Lennert Buytenhek
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/tc35815.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index 0ce2db6..d737f6b 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -688,14 +688,11 @@ static void tc_handle_link_change(struct net_device *dev)
if (status_change && netif_msg_link(lp)) {
phy_print_status(phydev);
-#ifdef DEBUG
- printk(KERN_DEBUG
- "%s: MII BMCR %04x BMSR %04x LPA %04x\n",
- dev->name,
- phy_read(phydev, MII_BMCR),
- phy_read(phydev, MII_BMSR),
- phy_read(phydev, MII_LPA));
-#endif
+ pr_debug("%s: MII BMCR %04x BMSR %04x LPA %04x\n",
+ dev->name,
+ phy_read(phydev, MII_BMCR),
+ phy_read(phydev, MII_BMSR),
+ phy_read(phydev, MII_LPA));
}
}
--
1.6.3.1.9.g95405b.dirty
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 09/11] drivers/scsi: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
` (7 preceding siblings ...)
2009-05-15 17:59 ` [PATCH 08/11] drivers/net: " Joe Perches
@ 2009-05-15 17:59 ` Joe Perches
2009-05-15 18:56 ` James Bottomley
2009-05-15 17:59 ` [PATCH 10/11] fs/efs: " Joe Perches
2009-05-15 17:59 ` [PATCH 11/11] mm: " Joe Perches
10 siblings, 1 reply; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-scsi, James E.J. Bottomley
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/scsi/aha1542.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index 8059494..29d5118 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -509,9 +509,7 @@ static void aha1542_intr_handle(struct Scsi_Host *shost)
if (mbistatus == 3)
continue; /* Aborted command not found */
-#ifdef DEBUG
- printk(KERN_DEBUG "...done %d %d\n", mbo, mbi);
-#endif
+ pr_debug("...done %d %d\n", mbo, mbi);
SCtmp = HOSTDATA(shost)->SCint[mbo];
@@ -654,9 +652,7 @@ static int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
HOSTDATA(SCpnt->device->host)->aha1542_last_mbo_used = mbo;
spin_unlock_irqrestore(&aha1542_lock, flags);
-#ifdef DEBUG
- printk(KERN_DEBUG "Sending command (%d %x)...", mbo, done);
-#endif
+ pr_debug("Sending command (%d %x)...", mbo, done);
any2scsi(mb[mbo].ccbptr, SCSI_BUF_PA(&ccb[mbo])); /* This gets trashed for some reason */
--
1.6.3.1.9.g95405b.dirty
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 10/11] fs/efs: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
` (8 preceding siblings ...)
2009-05-15 17:59 ` [PATCH 09/11] drivers/scsi: " Joe Perches
@ 2009-05-15 17:59 ` Joe Perches
2009-05-15 17:59 ` [PATCH 11/11] mm: " Joe Perches
10 siblings, 0 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
fs/efs/dir.c | 5 ++---
fs/efs/inode.c | 14 ++++----------
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/fs/efs/dir.c b/fs/efs/dir.c
index 49308a2..a11997b 100644
--- a/fs/efs/dir.c
+++ b/fs/efs/dir.c
@@ -71,9 +71,8 @@ static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) {
namelen = dirslot->namelen;
nameptr = dirslot->name;
-#ifdef DEBUG
- printk(KERN_DEBUG "EFS: readdir(): block %d slot %d/%d: inode %u, name \"%s\", namelen %u\n", block, slot, dirblock->slots-1, inodenum, nameptr, namelen);
-#endif
+ pr_debug("EFS: readdir(): block %d slot %d/%d: inode %u, name \"%s\", namelen %u\n", block, slot, dirblock->slots-1, inodenum, nameptr, namelen);
+
if (namelen > 0) {
/* found the next entry */
filp->f_pos = (block << EFS_DIRBSIZE_BITS) | slot;
diff --git a/fs/efs/inode.c b/fs/efs/inode.c
index a8e7797..8df5d5e 100644
--- a/fs/efs/inode.c
+++ b/fs/efs/inode.c
@@ -139,10 +139,8 @@ struct inode *efs_iget(struct super_block *super, unsigned long ino)
brelse(bh);
-#ifdef DEBUG
- printk(KERN_DEBUG "EFS: efs_iget(): inode %lu, extents %d, mode %o\n",
- inode->i_ino, in->numextents, inode->i_mode);
-#endif
+ pr_debug("EFS: efs_iget(): inode %lu, extents %d, mode %o\n",
+ inode->i_ino, in->numextents, inode->i_mode);
switch (inode->i_mode & S_IFMT) {
case S_IFDIR:
@@ -239,9 +237,7 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
return 0;
}
-#ifdef DEBUG
- printk(KERN_DEBUG "EFS: map_block(): indirect search for logical block %u\n", block);
-#endif
+ pr_debug("EFS: map_block(): indirect search for logical block %u\n", block);
direxts = in->extents[0].cooked.ex_offset;
indexts = in->numextents;
@@ -283,9 +279,7 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
printk(KERN_ERR "EFS: bread() failed at block %d\n", iblock);
return 0;
}
-#ifdef DEBUG
- printk(KERN_DEBUG "EFS: map_block(): read indirect extent block %d\n", iblock);
-#endif
+ pr_debug("EFS: map_block(): read indirect extent block %d\n", iblock);
first = 0;
lastblock = iblock;
}
--
1.6.3.1.9.g95405b.dirty
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
` (9 preceding siblings ...)
2009-05-15 17:59 ` [PATCH 10/11] fs/efs: " Joe Perches
@ 2009-05-15 17:59 ` Joe Perches
2009-05-15 18:56 ` Serge E. Hallyn
2009-05-15 19:40 ` David Rientjes
10 siblings, 2 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
To: linux-kernel
Cc: linux-mm, Andrew Morton, James Morris, David Rientjes,
Serge Hallyn, David Howells
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
mm/oom_kill.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 92bcf1d..8f7fb51 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -159,10 +159,8 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
points >>= -(p->oomkilladj);
}
-#ifdef DEBUG
- printk(KERN_DEBUG "OOMkill: task %d (%s) got %lu points\n",
- p->pid, p->comm, points);
-#endif
+ pr_debug("OOMkill: task %d (%s) got %lu points\n",
+ p->pid, p->comm, points);
return points;
}
--
1.6.3.1.9.g95405b.dirty
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 ` [PATCH 11/11] mm: " Joe Perches
@ 2009-05-15 18:56 ` Serge E. Hallyn
2009-05-15 19:40 ` Joe Perches
2009-05-15 19:40 ` David Rientjes
1 sibling, 1 reply; 18+ messages in thread
From: Serge E. Hallyn @ 2009-05-15 18:56 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel, linux-mm, Andrew Morton, James Morris,
David Rientjes, David Howells
Quoting Joe Perches (joe@perches.com):
> From: Joe Perches <joe@perches.com>
>
> Signed-off-by: Joe Perches <joe@perches.com>
Seems reasonable - apart from my woes with dynamic_printk :)
Can you also remove the commented-out '#define DEBUG' line on
line 35 if you haven't already?
Acked-by: Serge Hallyn <serue@us.ibm.com>
thanks,
-serge
> ---
> mm/oom_kill.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 92bcf1d..8f7fb51 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -159,10 +159,8 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
> points >>= -(p->oomkilladj);
> }
>
> -#ifdef DEBUG
> - printk(KERN_DEBUG "OOMkill: task %d (%s) got %lu points\n",
> - p->pid, p->comm, points);
> -#endif
> + pr_debug("OOMkill: task %d (%s) got %lu points\n",
> + p->pid, p->comm, points);
> return points;
> }
>
> --
> 1.6.3.1.9.g95405b.dirty
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 09/11] drivers/scsi: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 ` [PATCH 09/11] drivers/scsi: " Joe Perches
@ 2009-05-15 18:56 ` James Bottomley
2009-05-15 19:04 ` Joe Perches
0 siblings, 1 reply; 18+ messages in thread
From: James Bottomley @ 2009-05-15 18:56 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, linux-scsi
On Fri, 2009-05-15 at 10:59 -0700, Joe Perches wrote:
> From: Joe Perches <joe@perches.com>
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/scsi/aha1542.c | 8 ++------
> 1 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
> index 8059494..29d5118 100644
> --- a/drivers/scsi/aha1542.c
> +++ b/drivers/scsi/aha1542.c
> @@ -509,9 +509,7 @@ static void aha1542_intr_handle(struct Scsi_Host *shost)
> if (mbistatus == 3)
> continue; /* Aborted command not found */
>
> -#ifdef DEBUG
> - printk(KERN_DEBUG "...done %d %d\n", mbo, mbi);
> -#endif
> + pr_debug("...done %d %d\n", mbo, mbi);
This one looks dangerous ... that's a per trigger printk from interrupt
context. That's a lot of stuff to bung in the log buffer for a normal
operating case (which is pretty interrupt heavy). What does this do to
system responsiveness?
James
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 09/11] drivers/scsi: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 18:56 ` James Bottomley
@ 2009-05-15 19:04 ` Joe Perches
0 siblings, 0 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 19:04 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-kernel, linux-scsi
On Fri, 2009-05-15 at 18:56 +0000, James Bottomley wrote:
> On Fri, 2009-05-15 at 10:59 -0700, Joe Perches wrote:
> > diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
> > index 8059494..29d5118 100644
> > --- a/drivers/scsi/aha1542.c
> > +++ b/drivers/scsi/aha1542.c
> > @@ -509,9 +509,7 @@ static void aha1542_intr_handle(struct Scsi_Host *shost)
> > if (mbistatus == 3)
> > continue; /* Aborted command not found */
> >
> > -#ifdef DEBUG
> > - printk(KERN_DEBUG "...done %d %d\n", mbo, mbi);
> > -#endif
> > + pr_debug("...done %d %d\n", mbo, mbi);
>
> This one looks dangerous ... that's a per trigger printk from interrupt
> context. That's a lot of stuff to bung in the log buffer for a normal
> operating case (which is pretty interrupt heavy). What does this do to
> system responsiveness?
The normal operating case is not to define DEBUG.
Hmm, if CONFIG_DYNAMIC_DEBUG is enabled, it is a functional change.
Maybe the changes should be to pr_devel?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 18:56 ` Serge E. Hallyn
@ 2009-05-15 19:40 ` Joe Perches
0 siblings, 0 replies; 18+ messages in thread
From: Joe Perches @ 2009-05-15 19:40 UTC (permalink / raw)
To: Serge E. Hallyn
Cc: linux-kernel, linux-mm, Andrew Morton, James Morris,
David Rientjes, David Howells
On Fri, 2009-05-15 at 13:56 -0500, Serge E. Hallyn wrote:
> Seems reasonable - apart from my woes with dynamic_printk :)
pr_devel instead?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 ` [PATCH 11/11] mm: " Joe Perches
2009-05-15 18:56 ` Serge E. Hallyn
@ 2009-05-15 19:40 ` David Rientjes
1 sibling, 0 replies; 18+ messages in thread
From: David Rientjes @ 2009-05-15 19:40 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel, linux-mm, Andrew Morton, James Morris,
Serge Hallyn, David Howells
On Fri, 15 May 2009, Joe Perches wrote:
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 92bcf1d..8f7fb51 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -159,10 +159,8 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
> points >>= -(p->oomkilladj);
> }
>
> -#ifdef DEBUG
> - printk(KERN_DEBUG "OOMkill: task %d (%s) got %lu points\n",
> - p->pid, p->comm, points);
> -#endif
> + pr_debug("OOMkill: task %d (%s) got %lu points\n",
> + p->pid, p->comm, points);
> return points;
> }
>
You can just remove the entire printk() since this information is now
exported via /proc/pid/oom_score.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 03/11] arch/m68knommu: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
2009-05-15 17:59 ` [PATCH 03/11] arch/m68knommu: " Joe Perches
@ 2009-05-18 1:33 ` Greg Ungerer
0 siblings, 0 replies; 18+ messages in thread
From: Greg Ungerer @ 2009-05-18 1:33 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel
Hi Joe,
Joe Perches wrote:
> From: Joe Perches <joe@perches.com>
>
> Signed-off-by: Joe Perches <joe@perches.com>
Looks good, thanks. I'll apply to the m68knommu git tree
(for-linus branch).
Regards
Greg
> ---
> arch/m68knommu/kernel/setup.c | 16 +++++++---------
> arch/m68knommu/mm/init.c | 4 +---
> 2 files changed, 8 insertions(+), 12 deletions(-)
>
> diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
> index 5985f19..5c2bb3e 100644
> --- a/arch/m68knommu/kernel/setup.c
> +++ b/arch/m68knommu/kernel/setup.c
> @@ -166,15 +166,13 @@ void __init setup_arch(char **cmdline_p)
> printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)\n");
> #endif
>
> -#ifdef DEBUG
> - printk(KERN_DEBUG "KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
> - "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
> - (int) &_sdata, (int) &_edata,
> - (int) &_sbss, (int) &_ebss);
> - printk(KERN_DEBUG "MEMORY -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ",
> - (int) &_ebss, (int) memory_start,
> - (int) memory_start, (int) memory_end);
> -#endif
> + pr_debug("KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
> + "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
> + (int) &_sdata, (int) &_edata,
> + (int) &_sbss, (int) &_ebss);
> + pr_debug("MEMORY -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ",
> + (int) &_ebss, (int) memory_start,
> + (int) memory_start, (int) memory_end);
>
> /* Keep a copy of command line */
> *cmdline_p = &command_line[0];
> diff --git a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c
> index 7befc0c..b1703c6 100644
> --- a/arch/m68knommu/mm/init.c
> +++ b/arch/m68knommu/mm/init.c
> @@ -126,9 +126,7 @@ void __init mem_init(void)
> unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */
> unsigned long end_mem = memory_end; /* DAVIDM - this must not include kernel stack at top */
>
> -#ifdef DEBUG
> - printk(KERN_DEBUG "Mem_init: start=%lx, end=%lx\n", start_mem, end_mem);
> -#endif
> + pr_debug("Mem_init: start=%lx, end=%lx\n", start_mem, end_mem);
>
> end_mem &= PAGE_MASK;
> high_memory = (void *) end_mem;
--
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2009-05-18 1:33 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-15 17:59 [PATCH 00/11] Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug Joe Perches
2009-05-15 17:59 ` [PATCH 01/11] arch/arm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug( Joe Perches
2009-05-15 17:59 ` [PATCH 02/11] arch/h8300: " Joe Perches
2009-05-15 17:59 ` [PATCH 03/11] arch/m68knommu: " Joe Perches
2009-05-18 1:33 ` Greg Ungerer
2009-05-15 17:59 ` [PATCH 04/11] arch/powerpc: " Joe Perches
2009-05-15 17:59 ` [PATCH 05/11] arch/um: " Joe Perches
2009-05-15 17:59 ` [PATCH 06/11] drivers/isdn: " Joe Perches
2009-05-15 17:59 ` [PATCH 07/11] drivers/macintosh: " Joe Perches
2009-05-15 17:59 ` [PATCH 08/11] drivers/net: " Joe Perches
2009-05-15 17:59 ` [PATCH 09/11] drivers/scsi: " Joe Perches
2009-05-15 18:56 ` James Bottomley
2009-05-15 19:04 ` Joe Perches
2009-05-15 17:59 ` [PATCH 10/11] fs/efs: " Joe Perches
2009-05-15 17:59 ` [PATCH 11/11] mm: " Joe Perches
2009-05-15 18:56 ` Serge E. Hallyn
2009-05-15 19:40 ` Joe Perches
2009-05-15 19:40 ` David Rientjes
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).