nilfs2: reduce bare use of printk() with nilfs_msg()
Replace most use of printk() in nilfs2 implementation with nilfs_msg(), and reduce the following checkpatch.pl warning: "WARNING: Prefer [subsystem eg: netdev]_crit([subsystem]dev, ... then dev_crit(dev, ... then pr_crit(... to printk(KERN_CRIT ..." This patch also fixes a minor checkpatch warning "WARNING: quoted string split across lines" that often accompanies the prior warning, and amends message format as needed. Link: http://lkml.kernel.org/r/1464875891-5443-5-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
6625689e15
commit
feee880fa5
@@ -332,9 +332,9 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,
|
||||
int ret, ncps, nicps, nss, count, i;
|
||||
|
||||
if (unlikely(start == 0 || start > end)) {
|
||||
printk(KERN_ERR "%s: invalid range of checkpoint numbers: "
|
||||
"[%llu, %llu)\n", __func__,
|
||||
(unsigned long long)start, (unsigned long long)end);
|
||||
nilfs_msg(cpfile->i_sb, KERN_ERR,
|
||||
"cannot delete checkpoints: invalid range [%llu, %llu)",
|
||||
(unsigned long long)start, (unsigned long long)end);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -386,9 +386,9 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,
|
||||
cpfile, cno);
|
||||
if (ret == 0)
|
||||
continue;
|
||||
printk(KERN_ERR
|
||||
"%s: cannot delete block\n",
|
||||
__func__);
|
||||
nilfs_msg(cpfile->i_sb, KERN_ERR,
|
||||
"error %d deleting checkpoint block",
|
||||
ret);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -991,14 +991,12 @@ int nilfs_cpfile_read(struct super_block *sb, size_t cpsize,
|
||||
int err;
|
||||
|
||||
if (cpsize > sb->s_blocksize) {
|
||||
printk(KERN_ERR
|
||||
"NILFS: too large checkpoint size: %zu bytes.\n",
|
||||
cpsize);
|
||||
nilfs_msg(sb, KERN_ERR,
|
||||
"too large checkpoint size: %zu bytes", cpsize);
|
||||
return -EINVAL;
|
||||
} else if (cpsize < NILFS_MIN_CHECKPOINT_SIZE) {
|
||||
printk(KERN_ERR
|
||||
"NILFS: too small checkpoint size: %zu bytes.\n",
|
||||
cpsize);
|
||||
nilfs_msg(sb, KERN_ERR,
|
||||
"too small checkpoint size: %zu bytes", cpsize);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user