Skip to content

Commit

Permalink
block/blk-map: Remove set but unused variable 'added'
Browse files Browse the repository at this point in the history
The variable added is not effectively used in the function, so delete
it.

block/blk-map.c:273:16: warning: variable 'added' set but not used.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2049
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220905063253.120082-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Jiapeng Chong authored and axboe committed Sep 5, 2022
1 parent 2d8f7a3 commit 91e5add
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions block/blk-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter,
while (iov_iter_count(iter)) {
struct page **pages, *stack_pages[UIO_FASTIOV];
ssize_t bytes;
size_t offs, added = 0;
size_t offs;
int npages;

if (nr_vecs <= ARRAY_SIZE(stack_pages)) {
Expand Down Expand Up @@ -306,7 +306,6 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter,
break;
}

added += n;
bytes -= n;
offs = 0;
}
Expand Down

0 comments on commit 91e5add

Please sign in to comment.