Skip to content

Commit

Permalink
ocfs2: remove redundant assignment to variable bit_off
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Colin Ian King <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Changwei Ge <[email protected]>
Cc: Gang He <[email protected]>
Cc: Jun Piao <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
ColinIanKing authored and akpm00 committed Jun 24, 2023
1 parent a8992d8 commit 7982f97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ocfs2/localalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,
la_start_blk = ocfs2_clusters_to_blocks(osb->sb,
le32_to_cpu(la->la_bm_off));
bitmap = la->la_bitmap;
start = count = bit_off = 0;
start = count = 0;
left = le32_to_cpu(alloc->id1.bitmap1.i_total);

while ((bit_off = ocfs2_find_next_zero_bit(bitmap, left, start))
Expand Down

0 comments on commit 7982f97

Please sign in to comment.