Skip to contentSkip to conversation

sysv: Remove variable res

PATCH New Colin Ian King 1 participant 1 message Oct 21, 2022 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sysv: Remove variable res

The variable res being incremented but it is never referenced, it is redundant and can be removed.

---
 fs/sysv/itree.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
fs/sysv/itree.c +1 -3
index d4ec9bb97de9..505f4cb7be79 100644
@@ -430,12 +430,10 @@ static unsigned sysv_nblocks(struct super_block *s, loff_t size)
 {
 	struct sysv_sb_info *sbi = SYSV_SB(s);
 	int ptrs_bits = sbi->s_ind_per_block_bits;
-	unsigned blocks, res, direct = DIRECT, i = DEPTH;
+	unsigned blocks, direct = DIRECT, i = DEPTH;
 	blocks = (size + s->s_blocksize - 1) >> s->s_blocksize_bits;
-	res = blocks;
 	while (--i && blocks > direct) {
 		blocks = ((blocks - direct - 1) >> ptrs_bits) + 1;
-		res += blocks;
 		direct = 1;
 	}
 	return blocks;
Signature · 1 line
2.37.3