diff mbox series

ublk: fix build warning on iov_iter_get_pages2

Message ID 20230520151134.459679-1-ming.lei@redhat.com (mailing list archive)
State New, archived
Headers show
Series ublk: fix build warning on iov_iter_get_pages2 | expand

Commit Message

Ming Lei May 20, 2023, 3:11 p.m. UTC
Return type of iov_iter_get_pages2() is ssize_t instead of size_t, so
fix it.

Fixes: 981f95a571e3 ("ublk: cleanup ublk_copy_user_pages")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 drivers/block/ublk_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jens Axboe May 21, 2023, 2:18 a.m. UTC | #1
On Sat, 20 May 2023 23:11:34 +0800, Ming Lei wrote:
> Return type of iov_iter_get_pages2() is ssize_t instead of size_t, so
> fix it.
> 
> 

Applied, thanks!

[1/1] ublk: fix build warning on iov_iter_get_pages2
      commit: b8b637d770ef7aa9bc3971670cc8532b1f0d757e

Best regards,
diff mbox series

Patch

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index e00733b6fea8..539eada32861 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -564,7 +564,8 @@  static size_t ublk_copy_user_pages(const struct request *req,
 
 	while (iov_iter_count(uiter) && iter.bio) {
 		unsigned nr_pages;
-		size_t len, off;
+		ssize_t len;
+		size_t off;
 		int i;
 
 		len = iov_iter_get_pages2(uiter, iter.pages,