Skip to contentSkip to conversation

ext4: remove redundant assignment to variable split_flag1

PATCH Applied Colin Ian King 2 participants 2 messages Mar 1, 2022 – Mar 3, 2022

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

PATCH 1/1 ext4: remove redundant assignment to variable split_flag1

Variable split_flag1 is being assigned a value that is never read, it is being re-assigned a new value in the following code block. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
fs/ext4/extents.c:3371:2: warning: Value stored to 'split_flag1' is never read [deadcode.DeadStores]

---
 fs/ext4/extents.c | 1 -
 1 file changed, 1 deletion(-)
fs/ext4/extents.c +0 -1
index c0f3f83e0c1b..0d98cf402282 100644
@@ -3368,7 +3368,6 @@ static int ext4_split_extent(handle_t *handle,
 		return -EFSCORRUPTED;
 	}
 	unwritten = ext4_ext_is_unwritten(ex);
-	split_flag1 = 0;
 
 	if (map->m_lblk >= ee_block) {
 		split_flag1 = split_flag & EXT4_EXT_DATA_VALID2;
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 9 lines · Colin Ian King

Variable split_flag1 is being assigned a value that is never read, it is being re-assigned a new value in the following code block. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
fs/ext4/extents.c:3371:2: warning: Value stored to 'split_flag1' is never read [deadcode.DeadStores]

[...]

Applied, thanks!

[1/1] ext4: remove redundant assignment to variable split_flag1

      commit: 6b71b69dd98b197deea0806417e88308e0876a10

Best regards,

Signature · 1 line
Theodore Ts'o <[email protected]>