Added __user annotation to fix the following sparse warnings:

drivers/scsi/scsi_tgt_lib.c:365:45: warning: incorrect type in argument 4 
(different address spaces)
drivers/scsi/scsi_tgt_lib.c:365:45:    expected void [noderef] <asn:1>*<noident>
drivers/scsi/scsi_tgt_lib.c:365:45:    got void *<noident>

Signed-off-by: Jingoo Han <[email protected]>
---
No changes since v1:

 drivers/scsi/scsi_tgt_lib.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c
index 84a1fdf..bd82ea6 100644
--- a/drivers/scsi/scsi_tgt_lib.c
+++ b/drivers/scsi/scsi_tgt_lib.c
@@ -362,7 +362,8 @@ static int scsi_map_user_pages(struct scsi_tgt_cmd *tcmd, 
struct scsi_cmnd *cmd,
        int err;
 
        dprintk("%lx %u\n", uaddr, len);
-       err = blk_rq_map_user(q, rq, NULL, (void *)uaddr, len, GFP_KERNEL);
+       err = blk_rq_map_user(q, rq, NULL, (void __user *)uaddr, len,
+                             GFP_KERNEL);
        if (err) {
                /*
                 * TODO: need to fixup sg_tablesize, max_segment_size,
-- 
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to