diff options
-rw-r--r-- | drivers/scsi/scsi_devinfo.c | 6 | ||||
-rw-r--r-- | drivers/scsi/scsi_scan.c | 13 | ||||
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 5 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_spi.c | 12 |
4 files changed, 19 insertions, 17 deletions
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 449ef5adbb2b..dfb8da83fa50 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c | |||
@@ -374,10 +374,8 @@ int scsi_dev_info_list_add_keyed(int compatible, char *vendor, char *model, | |||
374 | model, compatible); | 374 | model, compatible); |
375 | 375 | ||
376 | if (strflags) | 376 | if (strflags) |
377 | devinfo->flags = simple_strtoul(strflags, NULL, 0); | 377 | flags = (__force blist_flags_t)simple_strtoul(strflags, NULL, 0); |
378 | else | 378 | devinfo->flags = flags; |
379 | devinfo->flags = flags; | ||
380 | |||
381 | devinfo->compatible = compatible; | 379 | devinfo->compatible = compatible; |
382 | 380 | ||
383 | if (compatible) | 381 | if (compatible) |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index be5e919db0e8..0880d975eed3 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -770,7 +770,7 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result, | |||
770 | * SCSI_SCAN_LUN_PRESENT: a new scsi_device was allocated and initialized | 770 | * SCSI_SCAN_LUN_PRESENT: a new scsi_device was allocated and initialized |
771 | **/ | 771 | **/ |
772 | static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, | 772 | static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, |
773 | int *bflags, int async) | 773 | blist_flags_t *bflags, int async) |
774 | { | 774 | { |
775 | int ret; | 775 | int ret; |
776 | 776 | ||
@@ -1049,14 +1049,15 @@ static unsigned char *scsi_inq_str(unsigned char *buf, unsigned char *inq, | |||
1049 | * - SCSI_SCAN_LUN_PRESENT: a new scsi_device was allocated and initialized | 1049 | * - SCSI_SCAN_LUN_PRESENT: a new scsi_device was allocated and initialized |
1050 | **/ | 1050 | **/ |
1051 | static int scsi_probe_and_add_lun(struct scsi_target *starget, | 1051 | static int scsi_probe_and_add_lun(struct scsi_target *starget, |
1052 | u64 lun, int *bflagsp, | 1052 | u64 lun, blist_flags_t *bflagsp, |
1053 | struct scsi_device **sdevp, | 1053 | struct scsi_device **sdevp, |
1054 | enum scsi_scan_mode rescan, | 1054 | enum scsi_scan_mode rescan, |
1055 | void *hostdata) | 1055 | void *hostdata) |
1056 | { | 1056 | { |
1057 | struct scsi_device *sdev; | 1057 | struct scsi_device *sdev; |
1058 | unsigned char *result; | 1058 | unsigned char *result; |
1059 | int bflags, res = SCSI_SCAN_NO_RESPONSE, result_len = 256; | 1059 | blist_flags_t bflags; |
1060 | int res = SCSI_SCAN_NO_RESPONSE, result_len = 256; | ||
1060 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | 1061 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); |
1061 | 1062 | ||
1062 | /* | 1063 | /* |
@@ -1201,7 +1202,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget, | |||
1201 | * Modifies sdevscan->lun. | 1202 | * Modifies sdevscan->lun. |
1202 | **/ | 1203 | **/ |
1203 | static void scsi_sequential_lun_scan(struct scsi_target *starget, | 1204 | static void scsi_sequential_lun_scan(struct scsi_target *starget, |
1204 | int bflags, int scsi_level, | 1205 | blist_flags_t bflags, int scsi_level, |
1205 | enum scsi_scan_mode rescan) | 1206 | enum scsi_scan_mode rescan) |
1206 | { | 1207 | { |
1207 | uint max_dev_lun; | 1208 | uint max_dev_lun; |
@@ -1292,7 +1293,7 @@ static void scsi_sequential_lun_scan(struct scsi_target *starget, | |||
1292 | * 0: scan completed (or no memory, so further scanning is futile) | 1293 | * 0: scan completed (or no memory, so further scanning is futile) |
1293 | * 1: could not scan with REPORT LUN | 1294 | * 1: could not scan with REPORT LUN |
1294 | **/ | 1295 | **/ |
1295 | static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, | 1296 | static int scsi_report_lun_scan(struct scsi_target *starget, blist_flags_t bflags, |
1296 | enum scsi_scan_mode rescan) | 1297 | enum scsi_scan_mode rescan) |
1297 | { | 1298 | { |
1298 | unsigned char scsi_cmd[MAX_COMMAND_SIZE]; | 1299 | unsigned char scsi_cmd[MAX_COMMAND_SIZE]; |
@@ -1538,7 +1539,7 @@ static void __scsi_scan_target(struct device *parent, unsigned int channel, | |||
1538 | unsigned int id, u64 lun, enum scsi_scan_mode rescan) | 1539 | unsigned int id, u64 lun, enum scsi_scan_mode rescan) |
1539 | { | 1540 | { |
1540 | struct Scsi_Host *shost = dev_to_shost(parent); | 1541 | struct Scsi_Host *shost = dev_to_shost(parent); |
1541 | int bflags = 0; | 1542 | blist_flags_t bflags = 0; |
1542 | int res; | 1543 | int res; |
1543 | struct scsi_target *starget; | 1544 | struct scsi_target *starget; |
1544 | 1545 | ||
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 50e7d7e4a861..a9996c16f4ae 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -967,7 +967,8 @@ sdev_show_wwid(struct device *dev, struct device_attribute *attr, | |||
967 | } | 967 | } |
968 | static DEVICE_ATTR(wwid, S_IRUGO, sdev_show_wwid, NULL); | 968 | static DEVICE_ATTR(wwid, S_IRUGO, sdev_show_wwid, NULL); |
969 | 969 | ||
970 | #define BLIST_FLAG_NAME(name) [ilog2(BLIST_##name)] = #name | 970 | #define BLIST_FLAG_NAME(name) \ |
971 | [ilog2((__force unsigned int)BLIST_##name)] = #name | ||
971 | static const char *const sdev_bflags_name[] = { | 972 | static const char *const sdev_bflags_name[] = { |
972 | #include "scsi_devinfo_tbl.c" | 973 | #include "scsi_devinfo_tbl.c" |
973 | }; | 974 | }; |
@@ -984,7 +985,7 @@ sdev_show_blacklist(struct device *dev, struct device_attribute *attr, | |||
984 | for (i = 0; i < sizeof(sdev->sdev_bflags) * BITS_PER_BYTE; i++) { | 985 | for (i = 0; i < sizeof(sdev->sdev_bflags) * BITS_PER_BYTE; i++) { |
985 | const char *name = NULL; | 986 | const char *name = NULL; |
986 | 987 | ||
987 | if (!(sdev->sdev_bflags & BIT(i))) | 988 | if (!(sdev->sdev_bflags & (__force blist_flags_t)BIT(i))) |
988 | continue; | 989 | continue; |
989 | if (i < ARRAY_SIZE(sdev_bflags_name) && sdev_bflags_name[i]) | 990 | if (i < ARRAY_SIZE(sdev_bflags_name) && sdev_bflags_name[i]) |
990 | name = sdev_bflags_name[i]; | 991 | name = sdev_bflags_name[i]; |
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index d0219e36080c..10ebb213ddb3 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -50,14 +50,14 @@ | |||
50 | 50 | ||
51 | /* Our blacklist flags */ | 51 | /* Our blacklist flags */ |
52 | enum { | 52 | enum { |
53 | SPI_BLIST_NOIUS = 0x1, | 53 | SPI_BLIST_NOIUS = (__force blist_flags_t)0x1, |
54 | }; | 54 | }; |
55 | 55 | ||
56 | /* blacklist table, modelled on scsi_devinfo.c */ | 56 | /* blacklist table, modelled on scsi_devinfo.c */ |
57 | static struct { | 57 | static struct { |
58 | char *vendor; | 58 | char *vendor; |
59 | char *model; | 59 | char *model; |
60 | unsigned flags; | 60 | blist_flags_t flags; |
61 | } spi_static_device_list[] __initdata = { | 61 | } spi_static_device_list[] __initdata = { |
62 | {"HP", "Ultrium 3-SCSI", SPI_BLIST_NOIUS }, | 62 | {"HP", "Ultrium 3-SCSI", SPI_BLIST_NOIUS }, |
63 | {"IBM", "ULTRIUM-TD3", SPI_BLIST_NOIUS }, | 63 | {"IBM", "ULTRIUM-TD3", SPI_BLIST_NOIUS }, |
@@ -221,9 +221,11 @@ static int spi_device_configure(struct transport_container *tc, | |||
221 | { | 221 | { |
222 | struct scsi_device *sdev = to_scsi_device(dev); | 222 | struct scsi_device *sdev = to_scsi_device(dev); |
223 | struct scsi_target *starget = sdev->sdev_target; | 223 | struct scsi_target *starget = sdev->sdev_target; |
224 | unsigned bflags = scsi_get_device_flags_keyed(sdev, &sdev->inquiry[8], | 224 | blist_flags_t bflags; |
225 | &sdev->inquiry[16], | 225 | |
226 | SCSI_DEVINFO_SPI); | 226 | bflags = scsi_get_device_flags_keyed(sdev, &sdev->inquiry[8], |
227 | &sdev->inquiry[16], | ||
228 | SCSI_DEVINFO_SPI); | ||
227 | 229 | ||
228 | /* Populate the target capability fields with the values | 230 | /* Populate the target capability fields with the values |
229 | * gleaned from the device inquiry */ | 231 | * gleaned from the device inquiry */ |