Skip to content

Commit 93b4e74

Browse files
ColinIanKingaxboe
authored andcommitted
xen-blkback: remove redundant assignment to variable i
Variable i is being assigned a value that is never read, it is being re-assigned later in a for-loop. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/block/xen-blkback/blkback.c:934:14: warning: Although the value stored to 'i' is used in the enclosing expression, the value is never actually read from 'i' [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20220317234646.78158-1-colin.i.king@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent ae53aea commit 93b4e74

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/block/xen-blkback/blkback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ static int xen_blkbk_parse_indirect(struct blkif_request *req,
931931
if (rc)
932932
goto unmap;
933933

934-
for (n = 0, i = 0; n < nseg; n++) {
934+
for (n = 0; n < nseg; n++) {
935935
uint8_t first_sect, last_sect;
936936

937937
if ((n % SEGS_PER_INDIRECT_FRAME) == 0) {

0 commit comments

Comments
 (0)