* [PATCH v2] ext4: Remove unused assignments
@ 2021-11-04 6:40 cgel.zte
2022-01-05 23:39 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-11-04 6:40 UTC (permalink / raw)
To: Theodore Ts'o
Cc: Andreas Dilger, linux-ext4, linux-kernel, luo penghao, Zeal Robot
From: luo penghao <luo.penghao@zte.com.cn>
The eh assignment in these two places is meaningless, because the
function will goto to merge, which will not use eh.
The clang_analyzer complains as follows:
fs/ext4/extents.c:1988:4 warning:
fs/ext4/extents.c:2016:4 warning:
Value stored to 'eh' is never read
change in v2:
Repair the sending email box
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
---
fs/ext4/extents.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index b1933e3..9ed8a15 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1986,7 +1986,6 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
+ ext4_ext_get_actual_len(newext));
if (unwritten)
ext4_ext_mark_unwritten(ex);
- eh = path[depth].p_hdr;
nearex = ex;
goto merge;
}
@@ -2015,7 +2014,6 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
+ ext4_ext_get_actual_len(newext));
if (unwritten)
ext4_ext_mark_unwritten(ex);
- eh = path[depth].p_hdr;
nearex = ex;
goto merge;
}
--
2.15.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ext4: Remove unused assignments
2021-11-04 6:40 [PATCH v2] ext4: Remove unused assignments cgel.zte
@ 2022-01-05 23:39 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2022-01-05 23:39 UTC (permalink / raw)
To: cgel.zte
Cc: Theodore Ts'o, Zeal Robot, luo penghao, linux-ext4,
linux-kernel, Andreas Dilger
On Thu, 4 Nov 2021 06:40:07 +0000, cgel.zte@gmail.com wrote:
> From: luo penghao <luo.penghao@zte.com.cn>
>
> The eh assignment in these two places is meaningless, because the
> function will goto to merge, which will not use eh.
>
> The clang_analyzer complains as follows:
>
> [...]
Applied, thanks!
[1/1] ext4: remove unused assignments
commit: 4bf7773e5a636b80de2b9025a7e107b38fe189b9
Best regards,
--
Theodore Ts'o <tytso@mit.edu>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-05 23:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 6:40 [PATCH v2] ext4: Remove unused assignments cgel.zte
2022-01-05 23:39 ` 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;
as well as URLs for NNTP newsgroup(s).