From: Petros Koutoupis Date: Fri, 6 May 2016 19:18:37 +0000 (-0700) Subject: hpsa: correct check for disk and zbc devices X-Git-Tag: v4.1.12-92~161^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5039ff6dc23fca6ad65f44370e1a112e99f5bd4a;p=users%2Fjedix%2Flinux-maple.git hpsa: correct check for disk and zbc devices The check added always skips over every device and the ioaccel parameters are never set. Reviewed-by: Justin Lindley Acked-by: Don Brace Orabug: 23064595 Signed-off-by: Manjunath Govindashetty --- diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index f061459fd31fd..d04f65efab713 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -1665,9 +1665,8 @@ static void hpsa_figure_phys_disk_ptrs(struct ctlr_info *h, for (j = 0; j < ndevices; j++) { if (dev[j] == NULL) continue; - if (dev[j]->devtype != TYPE_DISK) - continue; - if (dev[j]->devtype != TYPE_ZBC) + if ((dev[j]->devtype != TYPE_DISK) && + (dev[j]->devtype != TYPE_ZBC)) continue; if (is_logical_device(dev[j])) continue; @@ -1712,9 +1711,8 @@ static void hpsa_update_log_drive_phys_drive_ptrs(struct ctlr_info *h, for (i = 0; i < ndevices; i++) { if (dev[i] == NULL) continue; - if (dev[i]->devtype != TYPE_DISK) - continue; - if (dev[i]->devtype != TYPE_ZBC) + if ((dev[i]->devtype != TYPE_DISK) && + (dev[i]->devtype != TYPE_ZBC)) continue; if (!is_logical_device(dev[i])) continue;