aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index a112e49e946f..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') {