Commit c2e872a2 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

scsi: Avoid sign extension of scsi_device.type



This patch avoids that smatch reports the following:

drivers/scsi/scsi_sysfs.c:506 scsi_bus_uevent() warn: argument 3 to %02x specifier has type 'char'
drivers/scsi/scsi_sysfs.c:872 sdev_show_modalias() warn: argument 4 to %02x specifier has type 'char'

Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent f52d53a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -111,7 +111,7 @@ struct scsi_device {
	unsigned sector_size;	/* size in bytes */
	unsigned sector_size;	/* size in bytes */


	void *hostdata;		/* available to low-level driver */
	void *hostdata;		/* available to low-level driver */
	char type;
	unsigned char type;
	char scsi_level;
	char scsi_level;
	char inq_periph_qual;	/* PQ from INQUIRY data */	
	char inq_periph_qual;	/* PQ from INQUIRY data */	
	struct mutex inquiry_mutex;
	struct mutex inquiry_mutex;