Re: [PATCH 1/3] FS/EFS: convert printk to pr_foo()

From: Joe Perches
Date: Wed May 14 2014 - 13:14:19 EST


On Wed, 2014-05-14 at 19:08 +0200, Fabian Frederick wrote:
> Convert all except KERN_DEBUG

trivial note:

> diff --git a/fs/efs/file.c b/fs/efs/file.c
> index 1ccb364..a75c710 100644
> --- a/fs/efs/file.c
> +++ b/fs/efs/file.c
> @@ -22,7 +22,7 @@ int efs_get_block(struct inode *inode, sector_t iblock,
> /*
> * i have no idea why this happens as often as it does
> */
> - printk(KERN_WARNING "EFS: bmap(): block %d >= %ld (filesize %ld)\n",
> + pr_warn("EFS: bmap(): block %d >= %ld (filesize %ld)\n",
> block,
> inode->i_blocks,
> inode->i_size);
[]
> @@ -48,10 +48,8 @@ int efs_bmap(struct inode *inode, efs_block_t block) {
> /*
> * i have no idea why this happens as often as it does
> */
> - printk(KERN_WARNING "EFS: bmap(): block %d >= %ld (filesize %ld)\n",
> - block,
> - inode->i_blocks,
> - inode->i_size);
> + pr_warn("EFS: bmap(): block %d >= %ld (filesize %ld)\n",
> + block, inode->i_blocks, inode->i_size);
> #endif

Please use the same form for both blocks,
arguments on a single line.

[]

> @@ -130,7 +130,7 @@ struct inode *efs_iget(struct super_block *super, unsigned long ino)
> for(i = 0; i < EFS_DIRECTEXTENTS; i++) {
> extent_copy(&(efs_inode->di_u.di_extents[i]), &(in->extents[i]));
> if (i < in->numextents && in->extents[i].cooked.ex_magic != 0) {
> - printk(KERN_WARNING "EFS: extent %d has bad magic number in inode %lu\n", i, inode->i_ino);
> + pr_warn("EFS: extent %d has bad magic number in inode %lu\n", i, inode->i_ino);

Might as well wrap to 80 cols here.


--
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/