Skip to contentSkip to conversation

jfs: remove redundant assignments to ipaimap and ipaimap2

PATCH Superseded Colin Ian King 2 participants 2 messages Oct 17, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jfs: remove redundant assignments to ipaimap and ipaimap2

The pointers ipaimap and ipaimap2 are initialized with values that are never read, they are re-assigned later when they are required. The initializations are redundant and can be removed.

Cleans up two clang scan build warnings:
fs/jfs/jfs_umount.c:42:16: warning: Value stored to 'ipaimap' during its initialization is never read [deadcode.DeadStores]

fs/jfs/jfs_umount.c:43:16: warning: Value stored to 'ipaimap2' during its initialization is never read [deadcode.DeadStores]

---
 fs/jfs/jfs_umount.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/jfs/jfs_umount.c +2 -2
index 3e8b13e6aa01..cc4d7e6e8a4b 100644
@@ -39,8 +39,8 @@ int jfs_umount(struct super_block *sb)
 	struct jfs_sb_info *sbi = JFS_SBI(sb);
 	struct inode *ipbmap = sbi->ipbmap;
 	struct inode *ipimap = sbi->ipimap;
-	struct inode *ipaimap = sbi->ipaimap;
-	struct inode *ipaimap2 = sbi->ipaimap2;
+	struct inode *ipaimap;
+	struct inode *ipaimap2;
 	struct jfs_log *log;
 	int rc = 0;
 
Signature · 1 line
2.37.3
#1 lore raw
Quoted 3 lines · Colin Ian King

The pointers ipaimap and ipaimap2 are initialized with values that are never read, they are re-assigned later when they are required. The initializations are redundant and can be removed.

Hmm. Or we can remove the later assignments. That would seem more consistent with the ipbmap and ipimap.

Quoted 28 lines

Cleans up two clang scan build warnings:
fs/jfs/jfs_umount.c:42:16: warning: Value stored to 'ipaimap' during its initialization is never read [deadcode.DeadStores]

fs/jfs/jfs_umount.c:43:16: warning: Value stored to 'ipaimap2' during its initialization is never read [deadcode.DeadStores]

---
  fs/jfs/jfs_umount.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
fs/jfs/jfs_umount.c +2 -2
index 3e8b13e6aa01..cc4d7e6e8a4b 100644
@@ -39,8 +39,8 @@ int jfs_umount(struct super_block *sb)
  	struct jfs_sb_info *sbi = JFS_SBI(sb);
  	struct inode *ipbmap = sbi->ipbmap;
  	struct inode *ipimap = sbi->ipimap;
-	struct inode *ipaimap = sbi->ipaimap;
-	struct inode *ipaimap2 = sbi->ipaimap2;
+	struct inode *ipaimap;
+	struct inode *ipaimap2;
  	struct jfs_log *log;
  	int rc = 0;