Skip to contentSkip to conversation

tgt: add __user annotation

PATCH Superseded Jingoo Han 1 participant 1 message Aug 7, 2013 SCSI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 2/8 tgt: add __user annotation

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>

---
 drivers/scsi/scsi_tgt_lib.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/scsi_tgt_lib.c +2 -1
index 84a1fdf..bd82ea6 100644
@@ -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,
Signature · 1 line
1.7.10.4