tgt: add __user annotation
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>
Signed-off-by Jingoo Han <[email protected]>
--- drivers/scsi/scsi_tgt_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/scsi_tgt_lib.c +2 -1
@@ -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