From: Bart Van Assche Date: Fri, 25 Aug 2017 20:46:28 +0000 (-0700) Subject: scsi: Avoid sign extension of scsi_device.type X-Git-Tag: v4.14-rc1~41^2~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c2e872a27c610a5e2a71444f86470f765ed9dfce;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen --- diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 0979a5f3b69a3..f054f3f43c756 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;