diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2017-08-25 13:46:28 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-08-25 17:08:07 -0400 |
commit | c2e872a27c610a5e2a71444f86470f765ed9dfce (patch) | |
tree | 34404a5b478f15d88bcc9f906c6eb9f9dbd422f0 /include/scsi | |
parent | f52d53a9a0e08e3a003f0f3ff8e163125319af5a (diff) | |
download | linux-stable-c2e872a27c610a5e2a71444f86470f765ed9dfce.tar.gz linux-stable-c2e872a27c610a5e2a71444f86470f765ed9dfce.tar.bz2 linux-stable-c2e872a27c610a5e2a71444f86470f765ed9dfce.zip |
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: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_device.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 0979a5f3b69a..f054f3f43c75 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -111,7 +111,7 @@ struct scsi_device { unsigned sector_size; /* size in bytes */ void *hostdata; /* available to low-level driver */ - char type; + unsigned char type; char scsi_level; char inq_periph_qual; /* PQ from INQUIRY data */ struct mutex inquiry_mutex; |