Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug
Subsystems (12)
cover Change #ifdef DEBUG printk(KERN_DEBUG to pr_debug
From: Joe Perches <[email protected]>
Remove unnecessary #ifdef DEBUG/#endif pairs
with trivial conversions of:
#ifdef DEBUG
printk(KERN_DEBUG foo); #endif
to:
pr_debug(foo);
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(-)
PATCH 1/11 arch/arm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
From: Joe Perches <[email protected]>
--- arch/arm/mach-omap1/id.c | 26 ++++++++++++-------------- 1 files changed, 12 insertions(+), 14 deletions(-)
arch/arm/mach-omap1/id.c +12 -14
@@ -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 );
Signature · 1 line
1.6.3.1.9.g95405b.dirty
PATCH 2/11 arch/h8300: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
--- arch/h8300/kernel/setup.c | 24 ++++++++++-------------- arch/h8300/mm/init.c | 4 +--- 2 files changed, 11 insertions(+), 17 deletions(-)
arch/h8300/kernel/setup.c +10 -14
@@ -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 <[email protected]>\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" ); }/*
arch/h8300/mm/init.c +1 -3
@@ -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;
Signature · 1 line
1.6.3.1.9.g95405b.dirty
PATCH 3/11 arch/m68knommu: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
--- arch/m68knommu/kernel/setup.c | 16 +++++++--------- arch/m68knommu/mm/init.c | 4 +--- 2 files changed, 8 insertions(+), 12 deletions(-)
arch/m68knommu/kernel/setup.c +7 -9
@@ -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 ];
arch/m68knommu/mm/init.c +1 -3
@@ -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;
Signature · 1 line
1.6.3.1.9.g95405b.dirty
Re: [PATCH 03/11] arch/m68knommu: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
Hi Joe,
Quoted 3 lines · Joe Perches
From: Joe Perches <[email protected]>
Signed-off-by Joe Perches <[email protected]>
Looks good, thanks. I'll apply to the m68knommu git tree (for-linus branch).
Regards
Greg
Quoted 47 lines
--- arch/m68knommu/kernel/setup.c | 16 +++++++--------- arch/m68knommu/mm/init.c | 4 +--- 2 files changed, 8 insertions(+), 12 deletions(-)arch/m68knommu/kernel/setup.c +7
-9@@ -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 ];arch/m68knommu/mm/init.c +1
-3@@ -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;
Signature · 5 lines
------------------------------------------------------------------------ Greg Ungerer -- Principal Engineer EMAIL: [email protected] 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
PATCH 4/11 arch/powerpc: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
--- arch/powerpc/platforms/pseries/eeh_cache.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
arch/powerpc/platforms/pseries/eeh_cache.c +2 -4
@@ -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);
Signature · 1 line
1.6.3.1.9.g95405b.dirty
PATCH 5/11 arch/um: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
--- arch/um/drivers/hostaudio_kern.c | 38 +++++++++++--------------------------- 1 files changed, 11 insertions(+), 27 deletions(-)
arch/um/drivers/hostaudio_kern.c +11 -27
@@ -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);
Signature · 13 lines
1.6.3.1.9.g95405b.dirty ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
PATCH 6/11 drivers/isdn: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
--- 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(-)
drivers/isdn/i4l/isdn_bsdcomp.c +1 -3
@@ -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 ; }
drivers/isdn/pcbit/callbacks.c +2 -7
@@ -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);
drivers/isdn/pcbit/capi.c +4 -12
@@ -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 ;
drivers/isdn/pcbit/drv.c +9 -21
@@ -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
drivers/isdn/pcbit/layer2.c +9 -21
@@ -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 ;
Signature · 1 line
1.6.3.1.9.g95405b.dirty
PATCH 7/11 drivers/macintosh: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
--- drivers/macintosh/ans-lcd.c | 16 ++++------------ 1 files changed, 4 insertions(+), 12 deletions(-)
drivers/macintosh/ans-lcd.c +4 -12
@@ -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 );
Signature · 1 line
1.6.3.1.9.g95405b.dirty
PATCH 8/11 drivers/net: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
--- drivers/net/tc35815.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-)
drivers/net/tc35815.c +5 -8
@@ -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 )); } }
Signature · 1 line
1.6.3.1.9.g95405b.dirty
PATCH 9/11 drivers/scsi: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
--- drivers/scsi/aha1542.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)
drivers/scsi/aha1542.c +2 -6
@@ -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 */
Signature · 1 line
1.6.3.1.9.g95405b.dirty
James Bottomley
maintainerRe: [PATCH 09/11] drivers/scsi: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
Quoted 12 lines · Joe Perches
From: Joe Perches <[email protected]>
Signed-off-by Joe Perches <[email protected]>--- drivers/scsi/aha1542.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)drivers/scsi/aha1542.c +0
-0
drivers/scsi/aha1542.c static void aha1542_intr_handle(struct Scsi_Host *shost) · line 512
Quoted 7 lines
drivers/scsi/aha1542.c +1
-3@@ -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
Re: [PATCH 09/11] drivers/scsi: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
Quoted 9 lines · James Bottomley
Quoted 8 lines · Joe Perches
drivers/scsi/aha1542.c +0
-0@@ -509,9 +509,7 @@ static void aha1542_intr_handle(struct Scsi_Host *shost)if (mbistatus ==3 )continue ;/* Aborted command not found */
Quoted 9 lines
drivers/scsi/aha1542.c static void aha1542_intr_handle(struct Scsi_Host *shost) · line 512
Quoted 4 lines
drivers/scsi/aha1542.c +1
-3-#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?
PATCH 10/11 fs/efs: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
--- fs/efs/dir.c | 5 ++--- fs/efs/inode.c | 14 ++++---------- 2 files changed, 6 insertions(+), 13 deletions(-)
fs/efs/dir.c +2 -3
@@ -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;
fs/efs/inode.c +4 -10
@@ -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; }
Signature · 1 line
1.6.3.1.9.g95405b.dirty
PATCH 11/11 mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
--- mm/oom_kill.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
mm/oom_kill.c +2 -4
@@ -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; }
Signature · 7 lines
1.6.3.1.9.g95405b.dirty -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
Quoted 3 lines · Joe Perches
From: Joe Perches <[email protected]>
Signed-off-by Joe Perches <[email protected]>
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?
thanks,
-serge
Quoted 23 lines
--- mm/oom_kill.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)mm/oom_kill.c +2
-4@@ -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; }Signature · 1 line
1.6.3.1.9.g95405b.dirty
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
Quoted 1 line · Serge E. Hallyn
Seems reasonable - apart from my woes with
dynamic_printk:)
pr_devel instead?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
David Rientjes
reviewerRe: [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
In reply to Joe PerchesQuoted 7 lines · Joe Perches
mm/oom_kill.c +0
-0@@ -159,10 +159,8 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) points >>= -(p->oomkilladj); }
mm/oom_kill.c unsigned long badness(struct task_struct *p, unsigned long uptime) · line 166
Quoted 10 lines
mm/oom_kill.c +2
-4-#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.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>