diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2022-09-05 08:32:53 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-09-05 19:44:37 +0200 |
commit | 91e5adda5cf4e3bf21c46eaa2ae7ee2cb6058126 (patch) | |
tree | 2d17bfd7fcd78e34e9b30e8ceb946fb5662b4620 /block/blk-map.c | |
parent | blk-throttle: clean up codes that can't be reached (diff) | |
download | linux-91e5adda5cf4e3bf21c46eaa2ae7ee2cb6058126.tar.xz linux-91e5adda5cf4e3bf21c46eaa2ae7ee2cb6058126.zip |
block/blk-map: Remove set but unused variable 'added'
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>
Diffstat (limited to 'block/blk-map.c')
-rw-r--r-- | block/blk-map.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-map.c b/block/blk-map.c index f3768876d618..7693f8e3c454 100644 --- a/block/blk-map.c +++ b/block/blk-map.c @@ -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)) { @@ -306,7 +306,6 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter, break; } - added += n; bytes -= n; offs = 0; } |