diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-12-04 10:47:49 -0700 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-12-05 11:57:34 +0100 |
commit | 6ac805d13870925c787a28e3fe5cc73610cacd03 (patch) | |
tree | b6df0ba1c951216aebc531158b804e49361a881d /drivers | |
parent | b85ea95d086471afb4ad062012a4d73cd328fa86 (diff) | |
download | linux-6ac805d13870925c787a28e3fe5cc73610cacd03.tar.gz linux-6ac805d13870925c787a28e3fe5cc73610cacd03.tar.bz2 linux-6ac805d13870925c787a28e3fe5cc73610cacd03.zip |
iov_iter: remove unused 'iov' argument from import_single_range()
It is entirely unused, just get rid of it.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20231204174827.1258875-2-axboe@kernel.dk
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/ublk_drv.c | 6 | ||||
-rw-r--r-- | drivers/char/random.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 83600b45e12a..5656b0a1233d 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -893,11 +893,10 @@ static int ublk_map_io(const struct ublk_queue *ubq, const struct request *req, */ if (ublk_need_map_req(req)) { struct iov_iter iter; - struct iovec iov; const int dir = ITER_DEST; import_single_range(dir, u64_to_user_ptr(io->addr), rq_bytes, - &iov, &iter); + &iter); return ublk_copy_user_pages(req, 0, &iter, dir); } @@ -915,13 +914,12 @@ static int ublk_unmap_io(const struct ublk_queue *ubq, if (ublk_need_unmap_req(req)) { struct iov_iter iter; - struct iovec iov; const int dir = ITER_SOURCE; WARN_ON_ONCE(io->res > rq_bytes); import_single_range(dir, u64_to_user_ptr(io->addr), io->res, - &iov, &iter); + &iter); return ublk_copy_user_pages(req, 0, &iter, dir); } return rq_bytes; diff --git a/drivers/char/random.c b/drivers/char/random.c index 4a9c79391dee..e79ae238b30d 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1364,7 +1364,6 @@ static void __cold try_to_generate_entropy(void) SYSCALL_DEFINE3(getrandom, char __user *, ubuf, size_t, len, unsigned int, flags) { struct iov_iter iter; - struct iovec iov; int ret; if (flags & ~(GRND_NONBLOCK | GRND_RANDOM | GRND_INSECURE)) @@ -1385,7 +1384,7 @@ SYSCALL_DEFINE3(getrandom, char __user *, ubuf, size_t, len, unsigned int, flags return ret; } - ret = import_single_range(ITER_DEST, ubuf, len, &iov, &iter); + ret = import_single_range(ITER_DEST, ubuf, len, &iter); if (unlikely(ret)) return ret; return get_random_bytes_user(&iter); @@ -1491,7 +1490,6 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg) return 0; case RNDADDENTROPY: { struct iov_iter iter; - struct iovec iov; ssize_t ret; int len; @@ -1503,7 +1501,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg) return -EINVAL; if (get_user(len, p++)) return -EFAULT; - ret = import_single_range(ITER_SOURCE, p, len, &iov, &iter); + ret = import_single_range(ITER_SOURCE, p, len, &iter); if (unlikely(ret)) return ret; ret = write_pool_user(&iter); |