Re: [PATCH 1/3] Unionfs: use printk KERN_CONT for debugging messages
On Thu, 2008-01-03 at 00:57 -0500, Erez Zadok wrote: > diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c > index c2b8b58..5f1d887 100644 > --- a/fs/unionfs/debug.c > +++ b/fs/unionfs/debug.c > void __show_inode_times(const struct inode *inode, > @@ -472,15 +473,15 @@ void __show_inode_times(const struct inode *inode, > if (unlikely(!lower_inode)) > continue; > pr_debug("IT(%lu:%d): ", inode->i_ino, bindex); > - pr_debug("%s:%s:%d ", file, fxn, line); > - pr_debug("um=%lu/%lu lm=%lu/%lu ", > - inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, > - lower_inode->i_mtime.tv_sec, > - lower_inode->i_mtime.tv_nsec); > - pr_debug("uc=%lu/%lu lc=%lu/%lu\n", > - inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, > - lower_inode->i_ctime.tv_sec, > - lower_inode->i_ctime.tv_nsec); > + printk(KERN_CONT "%s:%s:%d ", file, fxn, line); > + printk(KERN_CONT "um=%lu/%lu lm=%lu/%lu ", > +inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, > +lower_inode->i_mtime.tv_sec, > +lower_inode->i_mtime.tv_nsec); > + printk(KERN_CONT "uc=%lu/%lu lc=%lu/%lu\n", > +inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, > +lower_inode->i_ctime.tv_sec, > +lower_inode->i_ctime.tv_nsec); > } > } > I think printks should be single statements and KERN_CONT should be used as sparingly as possible. Perhaps: pr_debug("IT(%lu:%d): %s:%s:%d " "um=%lu/%lu lm=%lu/%lu " "uc=%lu/%lu lc=%lu/%lu\n", inode->i_ino, bindex, file, fnx, line, inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, lower_inode->i_mtime.tv_sec, lower_inode->i_mtime.tv_nsec inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, lower_inode->i_ctime.tv_sec, lower_inode->i_ctime.tv_nsec); > @@ -497,15 +498,15 @@ void __show_dinode_times(const struct dentry *dentry, > continue; > pr_debug("DT(%s:%lu:%d): ", dentry->d_name.name, inode->i_ino, >bindex); > - pr_debug("%s:%s:%d ", file, fxn, line); > - pr_debug("um=%lu/%lu lm=%lu/%lu ", > - inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, > - lower_inode->i_mtime.tv_sec, > - lower_inode->i_mtime.tv_nsec); > - pr_debug("uc=%lu/%lu lc=%lu/%lu\n", > - inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, > - lower_inode->i_ctime.tv_sec, > - lower_inode->i_ctime.tv_nsec); > + printk(KERN_CONT "%s:%s:%d ", file, fxn, line); > + printk(KERN_CONT "um=%lu/%lu lm=%lu/%lu ", > +inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, > +lower_inode->i_mtime.tv_sec, > +lower_inode->i_mtime.tv_nsec); > + printk(KERN_CONT "uc=%lu/%lu lc=%lu/%lu\n", > +inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, > +lower_inode->i_ctime.tv_sec, > +lower_inode->i_ctime.tv_nsec); > } > } > and pr_debug("DT(%s:%lu:%d): %s:%s:%d " "um=%lu/%lu lm=%lu/%lu " "uc=%lu/%lu lc=%lu/%lu\n", dentry->d_name.name, inode->i_ino, bindex, file, fnx, line, inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, lower_inode->i_mtime.tv_sec, lower_inode->i_mtime.tv_nsec inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, lower_inode->i_ctime.tv_sec, lower_inode->i_ctime.tv_nsec); > > @@ -524,9 +525,10 @@ void __show_inode_counts(const struct inode *inode, > lower_inode = unionfs_lower_inode_idx(inode, bindex); > if (unlikely(!lower_inode)) > continue; > - pr_debug("SIC(%lu:%d:%d): ", inode->i_ino, bindex, > - atomic_read(&(inode)->i_count)); > - pr_debug("lc=%d ", atomic_read(&(lower_inode)->i_count)); > - pr_debug("%s:%s:%d\n", file, fxn, line); > + printk(KERN_CONT "SIC(%lu:%d:%d): ", inode->i_ino, bindex, > +atomic_read(&(inode)->i_count)); > + printk(KERN_CONT "lc=%d ", > +atomic_read(&(lower_inode)->i_count)); > + printk(KERN_CONT "%s:%s:%d\n", file, fxn, line); > } > } and pr_debug("SIC(%l
[PATCH] include/linux/: Spelling fixes
Signed-off-by: Joe Perches <[EMAIL PROTECTED]> --- include/linux/chio.h|2 +- include/linux/cyclades.h|2 +- include/linux/cycx_x25.h|2 +- include/linux/dmaengine.h |2 +- include/linux/ethtool.h |2 +- include/linux/fs.h |2 +- include/linux/hdreg.h |2 +- include/linux/llc.h |4 ++-- include/linux/pm.h |2 +- include/linux/pnp.h |2 +- include/linux/reiserfs_fs_sb.h |2 +- include/linux/sm501-regs.h |2 +- include/linux/spinlock_api_up.h |2 +- include/linux/wireless.h|2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/linux/chio.h b/include/linux/chio.h index a404c11..519248d 100644 --- a/include/linux/chio.h +++ b/include/linux/chio.h @@ -108,7 +108,7 @@ struct changer_element_status { /* * CHIOGELEM - *get more detailed status informtion for a single element + *get more detailed status information for a single element */ struct changer_get_element { int cge_type;/* type/unit */ diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h index 8f3dcd3..504cb2c 100644 --- a/include/linux/cyclades.h +++ b/include/linux/cyclades.h @@ -177,7 +177,7 @@ struct CUSTOM_REG { __u32 fpga_version; /* FPGA Version Number Register */ __u32 cpu_start; /* CPU start Register (write) */ __u32 cpu_stop; /* CPU stop Register (write) */ - __u32 misc_reg; /* Miscelaneous Register */ + __u32 misc_reg; /* Miscellaneous Register */ __u32 idt_mode; /* IDT mode Register */ __u32 uart_irq_status;/* UART IRQ status Register */ __u32 clear_timer0_irq; /* Clear timer interrupt Register */ diff --git a/include/linux/cycx_x25.h b/include/linux/cycx_x25.h index f7a9065..362bf19 100644 --- a/include/linux/cycx_x25.h +++ b/include/linux/cycx_x25.h @@ -81,7 +81,7 @@ struct cycx_x25_cmd { * @n2win - level 2 window (values: 1 thru 7) * @n3win - level 3 window (values: 1 thru 7) * @nvc - # of logical channels (values: 1 thru 64) - * @pktlen - level 3 packet lenght - log base 2 of size + * @pktlen - level 3 packet length - log base 2 of size * @locaddr - my address * @remaddr - remote address * @t1 - time, in seconds diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index a3b6035..608a731 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -29,7 +29,7 @@ #include /** - * enum dma_state - resource PNP/power managment state + * enum dma_state - resource PNP/power management state * @DMA_RESOURCE_SUSPEND: DMA device going into low power state * @DMA_RESOURCE_RESUME: DMA device returning to full power * @DMA_RESOURCE_AVAILABLE: DMA device available to the system diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 71d4ada..fcbe8b6 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -309,7 +309,7 @@ int ethtool_op_set_flags(struct net_device *dev, u32 data); * get_ringparam: Report ring sizes * set_ringparam: Set ring sizes * get_pauseparam: Report pause parameters - * set_pauseparam: Set pause paramters + * set_pauseparam: Set pause parameters * get_rx_csum: Report whether receive checksums are turned on or off * set_rx_csum: Turn receive checksum on or off * get_tx_csum: Report whether transmit checksums are turned on or off diff --git a/include/linux/fs.h b/include/linux/fs.h index b3ec4a4..d8e2ebb 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1305,7 +1305,7 @@ struct super_operations { * being set. find_inode() uses this to prevent returning * nearly-dead inodes. * I_SYNC Similar to I_LOCK, but limited in scope to writeback - * of inode dirty data. Having a seperate lock for this + * of inode dirty data. Having a separate lock for this * purpose reduces latency and prevents some filesystem- * specific deadlocks. * diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index 818c6af..88d753f 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h @@ -358,7 +358,7 @@ typedef struct hd_drive_hob_hdr { #define SETFEATURES_EN_RLA 0xAA/* Enable read look-ahead feature */ #define SETFEATURES_PREFETCH 0xAB/* Sets drive prefetch value */ #define SETFEATURES_EN_REST0xAC/* ATA-1 */ -#define SETFEATURES_4B_RW_LONG 0xBB/* Set Lenght of 4 bytes */ +#define SETFEATURES_4B_RW_LONG 0xBB/* Set Length of 4 bytes */ #define SETFEATURES_DIS_AAM0xC2/* Disable Automatic Acoustic Management */ #define SETFEATURES_EN_RPOD0xCC/* Enable reverting to power on defaults */ #define SETFEATURES_