Re: [PATCH 3/3] FS/EFS: convert printk(KERN_DEBUG to pr_debug
From: Joe Perches
Date: Wed May 14 2014 - 13:21:18 EST
On Wed, 2014-05-14 at 19:15 +0200, Fabian Frederick wrote:
> All KERN_DEBUG callsites being under #ifdef DEBUG
> we can safely convert everything to pr_debug without changing
> current behaviour.
You could also remove most of the #ifdef DEBUG/#endif blocks
> diff --git a/fs/efs/dir.c b/fs/efs/dir.c
[]
> @@ -73,7 +73,9 @@ static int efs_readdir(struct file *file, struct dir_context *ctx)
> 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);
> + pr_debug("%s(): block %d slot %d/%d: inode %u, name \"%s\", namelen %u\n",
> + __func__, block, slot, dirblock->slots-1,
> + inodenum, nameptr, namelen);
> #endif
Like this one
> diff --git a/fs/efs/inode.c b/fs/efs/inode.c
[]
> @@ -140,8 +140,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);
> + pr_debug("efs_iget(): inode %lu, extents %d, mode %o\n",
> + inode->i_ino, in->numextents, inode->i_mode);
> #endif
and this, etc...
> diff --git a/fs/efs/super.c b/fs/efs/super.c
[]
> @@ -184,7 +184,7 @@ static efs_block_t efs_validate_vh(struct volume_header *vh) {
> }
>
> #ifdef DEBUG
> - printk(KERN_DEBUG "EFS: bf: \"%16s\"\n", vh->vh_bootfile);
> + pr_debug("bf: \"%16s\"\n", vh->vh_bootfile);
>
> for(i = 0; i < NVDIR; i++) {
> int j;
but not this.
> @@ -211,12 +211,11 @@ static efs_block_t efs_validate_vh(struct volume_header *vh) {
> }
> #ifdef DEBUG
> if (be32_to_cpu(vh->vh_pt[i].pt_nblks)) {
> - printk(KERN_DEBUG "EFS: pt %2d: start: %08d size: %08d type: 0x%02x (%s)\n",
> - i,
> - (int) be32_to_cpu(vh->vh_pt[i].pt_firstlbn),
> - (int) be32_to_cpu(vh->vh_pt[i].pt_nblks),
> - pt_type,
> - (pt_entry->pt_name) ? pt_entry->pt_name : "unknown");
> + pr_debug("pt %2d: start: %08d size: %08d type: 0x%02x (%s)\n",
> + i, (int)be32_to_cpu(vh->vh_pt[i].pt_firstlbn),
> + (int)be32_to_cpu(vh->vh_pt[i].pt_nblks),
> + pt_type, (pt_entry->pt_name) ?
> + pt_entry->pt_name : "unknown");
> }
> #endif
or this
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/