[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231128210615.875085-8-sashal@kernel.org>
Date: Tue, 28 Nov 2023 16:05:14 -0500
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Colin Ian King <colin.i.king@...il.com>, Coly Li <colyli@...e.de>,
Jens Axboe <axboe@...nel.dk>, Sasha Levin <sashal@...nel.org>,
kent.overstreet@...il.com, nathan@...nel.org,
ndesaulniers@...gle.com, linux-bcache@...r.kernel.org,
llvm@...ts.linux.dev
Subject: [PATCH AUTOSEL 6.6 08/40] bcache: remove redundant assignment to variable cur_idx
From: Colin Ian King <colin.i.king@...il.com>
[ 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 <colin.i.king@...il.com>
Reviewed-by: Coly Li <colyli@...e.de>
Signed-off-by: Coly Li <colyli@...e.de>
Link: https://lore.kernel.org/r/20231120052503.6122-4-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/md/bcache/writeback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c
index 24c049067f61a..c3e872e0a6f2c 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);
--
2.42.0
Powered by blists - more mailing lists