From 831942d57795cb3a52b3163eeeb825db46929373 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 29 Oct 2009 19:29:22 +0000 Subject: [PATCH] The patch below fixes two occurrences of the following sparse warning: warning: incorrect type in argument 2 (different address spaces) The patch below has been tested by verifying the output of the following command: scripts/run-regression-tests 2.6.31.5 Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1302 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index f8b68e595..87fa19cd2 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -2397,7 +2397,8 @@ static void vdisk_exec_read(struct scst_cmd *cmd, } /* READ */ - err = vfs_readv(fd, iv, iv_count, &fd->f_pos); + err = vfs_readv(fd, (struct iovec __force __user *)iv, iv_count, + &fd->f_pos); if ((err < 0) || (err < full_len)) { PRINT_ERROR("readv() returned %lld from %zd", @@ -2486,7 +2487,8 @@ restart: } /* WRITE */ - err = vfs_writev(fd, eiv, eiv_count, &fd->f_pos); + err = vfs_writev(fd, (struct iovec __force __user *)eiv, eiv_count, + &fd->f_pos); if (err < 0) { PRINT_ERROR("write() returned %lld from %zd",