The patch below fixes two occurrences of the following sparse warning:
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 29 Oct 2009 19:29:22 +0000 (19:29 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 29 Oct 2009 19:29:22 +0000 (19:29 +0000)
  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 <bart.vanassche@gmail.com>
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1302 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scst/src/dev_handlers/scst_vdisk.c

index f8b68e5..87fa19c 100644 (file)
@@ -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",