diff options
Diffstat (limited to 'drivers/scsi/sd.c')
| -rw-r--r-- | drivers/scsi/sd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index c647d85d97d1..354199011246 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
| @@ -175,7 +175,7 @@ static ssize_t sd_store_cache_type(struct class_device *cdev, const char *buf, | |||
| 175 | * it's not worth the risk */ | 175 | * it's not worth the risk */ |
| 176 | return -EINVAL; | 176 | return -EINVAL; |
| 177 | 177 | ||
| 178 | for (i = 0; i < sizeof(sd_cache_types)/sizeof(sd_cache_types[0]); i++) { | 178 | for (i = 0; i < ARRAY_SIZE(sd_cache_types); i++) { |
| 179 | const int len = strlen(sd_cache_types[i]); | 179 | const int len = strlen(sd_cache_types[i]); |
| 180 | if (strncmp(sd_cache_types[i], buf, len) == 0 && | 180 | if (strncmp(sd_cache_types[i], buf, len) == 0 && |
| 181 | buf[len] == '\n') { | 181 | buf[len] == '\n') { |
| @@ -891,7 +891,7 @@ static struct block_device_operations sd_fops = { | |||
| 891 | static void sd_rw_intr(struct scsi_cmnd * SCpnt) | 891 | static void sd_rw_intr(struct scsi_cmnd * SCpnt) |
| 892 | { | 892 | { |
| 893 | int result = SCpnt->result; | 893 | int result = SCpnt->result; |
| 894 | int this_count = SCpnt->bufflen; | 894 | int this_count = SCpnt->request_bufflen; |
| 895 | int good_bytes = (result == 0 ? this_count : 0); | 895 | int good_bytes = (result == 0 ? this_count : 0); |
| 896 | sector_t block_sectors = 1; | 896 | sector_t block_sectors = 1; |
| 897 | u64 first_err_block; | 897 | u64 first_err_block; |
