From: Colin Ian King Date: Mon, 20 Nov 2023 05:24:56 +0000 (+0800) Subject: bcache: remove redundant assignment to variable cur_idx X-Git-Tag: v6.6.17~1927 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=665341724499addb5400202294eef513b0f5f5de;p=platform%2Fkernel%2Flinux-rpi.git bcache: remove redundant assignment to variable cur_idx [ Upstream commit be93825f0e6428c2d3f03a6e4d447dc48d33d7ff ] 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 Reviewed-by: Coly Li Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20231120052503.6122-4-colyli@suse.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c index d4432b3..3accfda 100644 --- a/drivers/md/bcache/writeback.c +++ b/drivers/md/bcache/writeback.c @@ -913,7 +913,7 @@ static int bch_dirty_init_thread(void *arg) int cur_idx, prev_idx, skip_nr; k = p = NULL; - cur_idx = prev_idx = 0; + prev_idx = 0; bch_btree_iter_init(&c->root->keys, &iter, NULL); k = bch_btree_iter_next_filter(&iter, &c->root->keys, bch_ptr_bad);