exfat: Remove unnecessary newlines from logging
Subsystems (2)
PATCH 1/1 exfat: Remove unnecessary newlines from logging
None of these message formats should end in a newline as exfat_msg and its callers already appends messages with one.
Miscellanea:
o Remove unnecessary trailing periods from formats.
--- fs/exfat/dir.c | 4 ++-- fs/exfat/fatent.c | 8 ++++---- fs/exfat/file.c | 2 +- fs/exfat/inode.c | 6 +++--- fs/exfat/misc.c | 2 +- fs/exfat/nls.c | 4 ++-- fs/exfat/super.c | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-)
fs/exfat/dir.c +2 -2
@@ -750,7 +750,7 @@ struct exfat_dentry *exfat_get_dentry(struct super_block *sb,sector_t sec;if (p_dir->dir ==DIR_DELETED ) { -exfat_msg (sb,KERN_ERR ,"abnormal access to deleted dentry\n" ); +exfat_msg (sb,KERN_ERR ,"abnormal access to deleted dentry" );return NULL ; }
@@ -853,7 +853,7 @@ struct exfat_entry_set_cache *exfat_get_dentry_set(struct super_block *sb,struct buffer_head *bh;if (p_dir->dir ==DIR_DELETED ) { -exfat_msg (sb,KERN_ERR ,"access to deleted dentry\n" ); +exfat_msg (sb,KERN_ERR ,"access to deleted dentry" );return NULL ; }
fs/exfat/fatent.c +4 -4
@@ -305,7 +305,7 @@ int exfat_zeroed_cluster(struct inode *dir, unsigned int clu)return 0 ; release_bhs: -exfat_msg (sb,KERN_ERR ,"failed zeroed sect %llu\n" , +exfat_msg (sb,KERN_ERR ,"failed zeroed sect %llu" , (unsigned long long )blknr);for (i =0 ; i < n; i++)bforget (bhs[i]);
@@ -325,7 +325,7 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc,if (unlikely (total_cnt < sbi->used_clusters)) {exfat_fs_error_ratelimit (sb, -"%s: invalid used clusters(t:%u,u:%u)\n" , +"%s: invalid used clusters(t:%u,u:%u)" , __func__, total_cnt, sbi->used_clusters);return -EIO ; }
@@ -338,7 +338,7 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc,if (hint_clu ==EXFAT_EOF_CLUSTER ) {if (sbi->clu_srch_ptr <EXFAT_FIRST_CLUSTER ) {exfat_msg (sb,KERN_ERR , -"sbi->clu_srch_ptr is invalid (%u)\n" , +"sbi->clu_srch_ptr is invalid (%u)" , sbi->clu_srch_ptr); sbi->clu_srch_ptr =EXFAT_FIRST_CLUSTER ; }
@@ -350,7 +350,7 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc,/* check cluster validation */ if (hint_clu <EXFAT_FIRST_CLUSTER && hint_clu >= sbi->num_clusters) { -exfat_msg (sb,KERN_ERR ,"hint_cluster is invalid (%u)\n" , +exfat_msg (sb,KERN_ERR ,"hint_cluster is invalid (%u)" , hint_clu); hint_clu =EXFAT_FIRST_CLUSTER ;if (p_chain->flags ==ALLOC_NO_FAT_CHAIN ) {
fs/exfat/file.c +1 -1
@@ -235,7 +235,7 @@ void exfat_truncate(struct inode *inode, loff_t size)/* * Empty start_clu != ~0 (not allocated) */ -exfat_fs_error (sb,"tried to truncate zeroed cluster." ); +exfat_fs_error (sb,"tried to truncate zeroed cluster" ); goto write_size; }
fs/exfat/inode.c +3 -3
@@ -181,7 +181,7 @@ static int exfat_map_cluster(struct inode *inode, unsigned int clu_offset,/* allocate a cluster */ if (num_to_be_allocated <1 ) {/* Broken FAT (i_sze > allocated FAT) */ -exfat_fs_error (sb,"broken FAT chain." ); +exfat_fs_error (sb,"broken FAT chain" );return -EIO ; }
@@ -351,7 +351,7 @@ static int exfat_get_block(struct inode *inode, sector_t iblock, err =exfat_map_new_buffer (ei, bh_result, pos);if (err) {exfat_fs_error (sb, -"requested for bmap out of range(pos : (%llu) > i_size_aligned(%llu)\n" , +"requested for bmap out of range(pos : (%llu) > i_size_aligned(%llu)" , pos, ei->i_size_aligned); goto unlock_ret; }
@@ -428,7 +428,7 @@ static int exfat_write_end(struct file *file, struct address_space *mapping,if (EXFAT_I (inode)->i_size_aligned <i_size_read (inode)) {exfat_fs_error (inode->i_sb, -"invalid size(size(%llu) > aligned(%llu)\n" , +"invalid size(size(%llu) > aligned(%llu)" ,i_size_read (inode),EXFAT_I (inode)->i_size_aligned);return -EIO ; }
fs/exfat/misc.c +1 -1
@@ -32,7 +32,7 @@ void __exfat_fs_error(struct super_block *sb, int report, const char *fmt, ...)va_start (args, fmt); vaf.fmt = fmt; vaf.va = &args; -exfat_msg (sb,KERN_ERR ,"error, %pV\n" , &vaf); +exfat_msg (sb,KERN_ERR ,"error, %pV" , &vaf);va_end (args); }
fs/exfat/nls.c +2 -2
@@ -688,7 +688,7 @@ static int exfat_load_upcase_table(struct super_block *sb, bh =sb_bread (sb, sector);if (!bh) {exfat_msg (sb,KERN_ERR , -"failed to read sector(0x%llx)\n" , +"failed to read sector(0x%llx)" , (unsigned long long )sector); ret = -EIO ; goto free_table;
@@ -723,7 +723,7 @@ static int exfat_load_upcase_table(struct super_block *sb,return 0 ;exfat_msg (sb,KERN_ERR , -"failed to load upcase table (idx : 0x%08x, chksum : 0x%08x, utbl_chksum : 0x%08x)\n" , +"failed to load upcase table (idx : 0x%08x, chksum : 0x%08x, utbl_chksum : 0x%08x)" , index, checksum, utbl_checksum); ret = -EINVAL ; free_table:
fs/exfat/super.c +2 -2
@@ -573,7 +573,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc) root_inode =new_inode (sb);if (!root_inode) { -exfat_msg (sb,KERN_ERR ,"failed to allocate root inode." ); +exfat_msg (sb,KERN_ERR ,"failed to allocate root inode" ); err = -ENOMEM ; goto free_table; }
@@ -582,7 +582,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)inode_set_iversion (root_inode,1 ); err =exfat_read_root (root_inode);if (err) { -exfat_msg (sb,KERN_ERR ,"failed to initialize root inode." ); +exfat_msg (sb,KERN_ERR ,"failed to initialize root inode" ); goto put_inode; }
Quoted 8 lines
None of these message formats should end in a newline as
exfat_msgand its callers already appends messages with one.Miscellanea:
o Remove unnecessary trailing periods from formats.
Signed-off-by Joe Perches <[email protected]>
Looks good!
Thanks!
Quoted 14 lines
--- fs/exfat/dir.c | 4 ++-- fs/exfat/fatent.c | 8 ++++---- fs/exfat/file.c | 2 +- fs/exfat/inode.c | 6 +++--- fs/exfat/misc.c | 2 +- fs/exfat/nls.c | 4 ++-- fs/exfat/super.c | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-)
fs/exfat/dir.c struct exfat_dentry *exfat_get_dentry(struct · line 755
Quoted 7 lines
fs/exfat/dir.c +1
-1@@ -750,7 +750,7 @@ struct exfat_dentry *exfat_get_dentry(structsuper_block *sb, sector_t sec;if (p_dir->dir ==DIR_DELETED ) { -exfat_msg (sb,KERN_ERR ,"abnormal access to deleted dentry\n"); + exfat_msg(sb, KERN_ERR, "abnormal access to deleted
dentry");
Quoted 85 lines
fs/exfat/dir.c +0
-0return NULL ;fs/exfat/dir.c +1
-1}@@ -853,7 +853,7 @@ struct exfat_entry_set_cache *exfat_get_dentry_set(struct super_block *sb, struct buffer_head *bh;if (p_dir->dir ==DIR_DELETED ) { -exfat_msg (sb,KERN_ERR ,"access to deleted dentry\n" ); +exfat_msg (sb,KERN_ERR ,"access to deleted dentry" );return NULL ; }fs/exfat/fatent.c index a855b17..dcf840 renamed from fs/exfat/fatent.c +0
-0100644
fs/exfat/fatent.c +1
-1@@ -305,7 +305,7 @@ int exfat_zeroed_cluster(struct inode *dir, unsigned int clu)return 0 ; release_bhs: -exfat_msg (sb,KERN_ERR ,"failed zeroed sect %llu\n" , +exfat_msg (sb,KERN_ERR ,"failed zeroed sect %llu" , (unsigned long long )blknr);for (i =0 ; i < n; i++)fs/exfat/fatent.c +1
-1bforget (bhs[i]);@@ -325,7 +325,7 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc, if (unlikely(total_cnt < sbi->used_clusters)) { exfat_fs_error_ratelimit(sb, -"%s: invalid used clusters(t:%u,u:%u)\n" , +"%s: invalid used clusters(t:%u,u:%u)" , __func__, total_cnt, sbi->used_clusters);return -EIO ;fs/exfat/fatent.c +1
-1}@@ -338,7 +338,7 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc, if (hint_clu == EXFAT_EOF_CLUSTER) {if (sbi->clu_srch_ptr <EXFAT_FIRST_CLUSTER ) {exfat_msg (sb,KERN_ERR , -"sbi->clu_srch_ptr is invalid (%u)\n" , +"sbi->clu_srch_ptr is invalid (%u)" , sbi->clu_srch_ptr); sbi->clu_srch_ptr =EXFAT_FIRST_CLUSTER ;fs/exfat/fatent.c +1
-1}@@ -350,7 +350,7 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc, /* check cluster validation */ if (hint_clu < EXFAT_FIRST_CLUSTER && hint_clu >= sbi->num_clusters) { - exfat_msg(sb, KERN_ERR, "hint_cluster is invalid (%u)\n", + exfat_msg(sb, KERN_ERR, "hint_cluster is invalid (%u)", hint_clu);fs/exfat/fatent.c +0
-0hint_clu =EXFAT_FIRST_CLUSTER ; if (p_chain->flags == ALLOC_NO_FAT_CHAIN) { diff --git
a/fs/exfat/file.cb/fs/exfat/file.cindex 483f68..146024 100644fs/exfat/file.c +1
-1@@ -235,7 +235,7 @@ void exfat_truncate(struct inode *inode, loff_t size)/* * Empty start_clu != ~0 (not allocated) */ -exfat_fs_error (sb,"tried to truncate zeroed cluster." ); +exfat_fs_error (sb,"tried to truncate zeroed cluster" ); goto write_size; }fs/exfat/inode.c index 068874..a84819 renamed from fs/exfat/inode.c +0
-0100644
fs/exfat/inode.c +1
-1@@ -181,7 +181,7 @@ static int exfat_map_cluster(struct inode *inode,unsigned int clu_offset,/* allocate a cluster */ if (num_to_be_allocated < 1) {/* Broken FAT (i_sze > allocated FAT) */ - exfat_fs_error(sb, "broken FAT chain."); + exfat_fs_error(sb, "broken FAT chain");return -EIO ; }
fs/exfat/inode.c static int exfat_get_block(struct inode *inode, · line 355
Quoted 5 lines
fs/exfat/inode.c +0
-1@@ -351,7 +351,7 @@ static int exfat_get_block(struct inode *inode,sector_t iblock, err =exfat_map_new_buffer (ei, bh_result, pos);if (err) { exfat_fs_error(sb, - "requested for bmap out of range(pos
:
fs/exfat/inode.c static int exfat_get_block(struct inode *inode, · line 356
Quoted 2 lines
fs/exfat/inode.c +1
-0(%llu) > i_size_aligned(%llu)\n", + "requested for bmap out of range(pos
:
fs/exfat/misc.c void __exfat_fs_error(struct super_block *sb, int
Quoted 20 lines
(%llu) >
fs/exfat/inode.c +2
-1+i_size_aligned(%llu)", pos, ei->i_size_aligned); goto unlock_ret; }@@ -428,7 +428,7 @@ static int exfat_write_end(struct file *file, struct address_space *mapping, if (EXFAT_I(inode)->i_size_aligned < i_size_read(inode)) {exfat_fs_error (inode->i_sb, -"invalid size(size(%llu) > aligned(%llu)\n" , +"invalid size(size(%llu) > aligned(%llu)" ,i_size_read (inode),EXFAT_I (inode)->i_size_aligned);return -EIO ;fs/exfat/inode.c +0
-0}fs/exfat/misc.c index 14a330..d480b5a renamed from fs/exfat/misc.c +0
-0100644
fs/exfat/misc.c +0
-0@@ -32,7 +32,7 @@ void __exfat_fs_error(struct super_block *sb, int
report,
Quoted 59 lines
fs/exfat/misc.c +1
-1const char *fmt, ...)va_start (args ,fmt ); vaf.fmt = fmt; vaf.va = &args; -exfat_msg (sb,KERN_ERR ,"error, %pV\n" , &vaf); +exfat_msg (sb,KERN_ERR ,"error, %pV" , &vaf);va_end (args); }fs/exfat/nls.c +1
-1@@ -688,7 +688,7 @@ static int exfat_load_upcase_table(struct super_block *sb, bh =sb_bread (sb, sector);if (!bh) {exfat_msg (sb,KERN_ERR , -"failed to read sector(0x%llx)\n" , +"failed to read sector(0x%llx)" , (unsigned long long )sector); ret = -EIO ;fs/exfat/nls.c +2
-1goto free_table;@@ -723,7 +723,7 @@ static int exfat_load_upcase_table(struct super_block *sb, return 0; exfat_msg(sb, KERN_ERR, - "failed to load upcase table (idx : 0x%08x, chksum : 0x%08x, utbl_chksum : 0x%08x)\n", + "failed to load upcase table (idx : 0x%08x, chksum : 0x%08x, +utbl_chksum : 0x%08x)", index, checksum, utbl_checksum); ret = -EINVAL ; free_table:fs/exfat/super.c index 16ed202e..3e3c606 renamed from fs/exfat/super.c +0
-0100644
fs/exfat/super.c +1
-1@@ -573,7 +573,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc) root_inode =new_inode (sb);if (!root_inode) { -exfat_msg (sb,KERN_ERR ,"failed to allocate root inode." ); +exfat_msg (sb,KERN_ERR ,"failed to allocate root inode" ); err = -ENOMEM ; goto free_table;fs/exfat/super.c +1
-1}@@ -582,7 +582,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc) inode_set_iversion(root_inode, 1); err =exfat_read_root (root_inode);if (err) { -exfat_msg (sb,KERN_ERR ,"failed to initialize root inode." ); +exfat_msg (sb,KERN_ERR ,"failed to initialize root inode" ); goto put_inode; }