Re: [PATCH 12/19] sg: Fix type of last blk_trace_setup() argument

Hannes Reinecke
2017-08-25T15:51:09Z

On 08/23/2017 11:40 PM, Bart Van Assche wrote:
> Avoid that sparse reports the following:
>
> drivers/scsi/sg.c:1114:41: warning: incorrect type in argument 5 (different address spaces)
> drivers/scsi/sg.c:1114:41: expected char [noderef] <asn:1>*arg
> drivers/scsi/sg.c:1114:41: got char *<noident>
>
> This patch does not change any functionality.
>
> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Johannes Thumshirn <jthumshirn@suse.de>
> ---
> drivers/scsi/sg.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
> index f5705a95319f..03194c4b6744 100644
> --- a/drivers/scsi/sg.c
> +++ b/drivers/scsi/sg.c
> @@ -1110,8 +1110,7 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg)
> return blk_trace_setup(sdp->device->request_queue,
> sdp->disk->disk_name,
> MKDEV(SCSI_GENERIC_MAJOR, sdp->index),
> - NULL,
> - (char *)arg);
> + NULL, p);
> case BLKTRACESTART:
> return blk_trace_startstop(sdp->device->request_queue, 1);
> case BLKTRACESTOP:
>
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)