* [PATCH] ext4: remove redundant assignment to variable split_flag1
@ 2022-03-01 12:16 Colin Ian King
2022-03-03 15:14 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-03-01 12:16 UTC (permalink / raw)
To: Theodore Ts'o, Andreas Dilger, linux-ext4, linux-kernel
Cc: kernel-janitors, llvm
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]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/ext4/extents.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index c0f3f83e0c1b..0d98cf402282 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -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;
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: remove redundant assignment to variable split_flag1
2022-03-01 12:16 [PATCH] ext4: remove redundant assignment to variable split_flag1 Colin Ian King
@ 2022-03-03 15:14 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2022-03-03 15:14 UTC (permalink / raw)
To: linux-kernel, linux-ext4, Andreas Dilger, Colin Ian King
Cc: Theodore Ts'o, kernel-janitors, llvm
On Tue, 1 Mar 2022 12:16:44 +0000, Colin Ian King wrote:
> 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,
--
Theodore Ts'o <tytso@mit.edu>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-03 15:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01 12:16 [PATCH] ext4: remove redundant assignment to variable split_flag1 Colin Ian King
2022-03-03 15:14 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®