From: luo penghao Date: Wed, 8 Dec 2021 07:53:07 +0000 (+0000) Subject: ext4: remove unnecessary 'offset' assignment X-Git-Tag: v6.6.17~8228^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae6ec194b55273e52351ee70d694594dcabe405d;p=platform%2Fkernel%2Flinux-rpi.git ext4: remove unnecessary 'offset' assignment Although it is in the loop, offset is reassigned at the beginning of the while loop. And after the loop, the value will not be used The clang_analyzer complains as follows: fs/ext4/dir.c:306:3 warning: Value stored to 'offset' is never read Reported-by: Zeal Robot Signed-off-by: luo penghao Link: https://lore.kernel.org/r/20211208075307.404703-1-luo.penghao@zte.com.cn Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 74b172a..a6bb86f 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -303,7 +303,6 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx) goto done; brelse(bh); bh = NULL; - offset = 0; } done: err = 0;