Skip to content

Commit 7982f97

Browse files
ColinIanKingakpm00
authored andcommitted
ocfs2: remove redundant assignment to variable bit_off
Variable bit_off is being assigned a value that is never read, it is being re-assigned a new value in the following while loop. Remove the assignment. Cleans up clang scan build warning: fs/ocfs2/localalloc.c:976:18: warning: Although the value stored to 'bit_off' is used in the enclosing expression, the value is never actually read from 'bit_off' [deadcode.DeadStores] Link: https://lkml.kernel.org/r/20230622102736.2831126-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Gang He <ghe@suse.com> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent a8992d8 commit 7982f97

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/ocfs2/localalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,
973973
la_start_blk = ocfs2_clusters_to_blocks(osb->sb,
974974
le32_to_cpu(la->la_bm_off));
975975
bitmap = la->la_bitmap;
976-
start = count = bit_off = 0;
976+
start = count = 0;
977977
left = le32_to_cpu(alloc->id1.bitmap1.i_total);
978978

979979
while ((bit_off = ocfs2_find_next_zero_bit(bitmap, left, start))

0 commit comments

Comments
 (0)