Skip to content

Commit be93825

Browse files
ColinIanKingaxboe
authored andcommitted
bcache: remove redundant assignment to variable cur_idx
Variable cur_idx is being initialized with a value that is never read, it is being re-assigned later in a while-loop. Remove the redundant assignment. Cleans up clang scan build warning: drivers/md/bcache/writeback.c:916:2: warning: Value stored to 'cur_idx' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Coly Li <colyli@suse.de> Signed-off-by: Coly Li <colyli@suse.de> Link: https://lore.kernel.org/r/20231120052503.6122-4-colyli@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 777967e commit be93825

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/md/bcache/writeback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ static int bch_dirty_init_thread(void *arg)
913913
int cur_idx, prev_idx, skip_nr;
914914

915915
k = p = NULL;
916-
cur_idx = prev_idx = 0;
916+
prev_idx = 0;
917917

918918
bch_btree_iter_init(&c->root->keys, &iter, NULL);
919919
k = bch_btree_iter_next_filter(&iter, &c->root->keys, bch_ptr_bad);

0 commit comments

Comments
 (0)