Skip to contentSkip to conversation

jfs: remove unused pointer tblk

PATCH In review Colin Ian King 3 participants 3 messages Apr 24, 2022 – Apr 25, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jfs: remove unused pointer tblk

The pointer tlbk is not used, it is redundant and can be removed. Cleans up cppcheck warning:

linux/fs/jfs/jfs_xtree.c:2551:17: style: Unused variable: tblk [unusedVariable]

---
 fs/jfs/jfs_xtree.c | 1 -
 1 file changed, 1 deletion(-)
fs/jfs/jfs_xtree.c +0 -1
index 3148e9b35f3b..d29979d0a6aa 100644
@@ -2548,7 +2548,6 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad,	/* old XAD */
 	   int xtype)
 {				/* extent type: XTPAGE or DATAEXT */
 	int rc = 0;
-	struct tblock *tblk;
 	struct tlock *tlck;
 	struct xtlock *xtlck;
 	struct metapage *mp, *pmp, *lmp, *rmp;	/* meta-page buffer */
Signature · 1 line
2.35.1
#1 lore raw
Quoted 15 lines · Colin Ian King

The pointer tlbk is not used, it is redundant and can be removed. Cleans up cppcheck warning:

linux/fs/jfs/jfs_xtree.c:2551:17: style: Unused variable: tblk [unusedVariable]

---
 fs/jfs/jfs_xtree.c | 1 -
 1 file changed, 1 deletion(-)
fs/jfs/jfs_xtree.c +0 -0
index 3148e9b35f3b..d29979d0a6aa 100644

fs/jfs/jfs_xtree.c xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */ · line 2551

Quoted 4 lines
fs/jfs/jfs_xtree.c +0 -1
@@ -2548,7 +2548,6 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad,	/* old XAD */
 	   int xtype)
 {				/* extent type: XTPAGE or DATAEXT */
 	int rc = 0;
-	struct tblock *tblk;

This would have caused a build error if it weren't ifdeffed out.

#ifdef _STILL_TO_PORT

JFS is an IBM filesystem from OS/2. Apparently, this stuff never got ported? Probably we could just delete the dead code.

regards,
dan carpenter

#2 lore raw
Quoted 23 lines · Dan Carpenter
Quoted 15 lines · Colin Ian King

The pointer tlbk is not used, it is redundant and can be removed. Cleans up cppcheck warning:

linux/fs/jfs/jfs_xtree.c:2551:17: style: Unused variable: tblk [unusedVariable]

---
  fs/jfs/jfs_xtree.c | 1 -
  1 file changed, 1 deletion(-)
fs/jfs/jfs_xtree.c +0 -0
index 3148e9b35f3b..d29979d0a6aa 100644

fs/jfs/jfs_xtree.c xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad, /* old XAD */ · line 2551

Quoted 4 lines
fs/jfs/jfs_xtree.c +0 -1
@@ -2548,7 +2548,6 @@ xtRelocate(tid_t tid, struct inode * ip, xad_t * oxad,	/* old XAD */
  	   int xtype)
  {				/* extent type: XTPAGE or DATAEXT */
  	int rc = 0;
-	struct tblock *tblk;

This would have caused a build error if it weren't ifdeffed out.

Quoted 4 lines

#ifdef _STILL_TO_PORT

JFS is an IBM filesystem from OS/2. Apparently, this stuff never got ported? Probably we could just delete the dead code.

Yeah. Once, long ago, I had dreams of enhancing JFS with shiny new function like defragmentation. I think it's safe to say that isn't going to happen.

Shaggy

Quoted 4 lines

regards,
dan carpenter