]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
hpsa: correct check for disk and zbc devices
authorPetros Koutoupis <petros@petroskoutoupis.com>
Fri, 6 May 2016 19:18:37 +0000 (12:18 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 22 May 2016 21:50:40 +0000 (14:50 -0700)
The check added always skips over every device and the
ioaccel parameters are never set.

Reviewed-by: Justin Lindley <Justin.Lindley@microsemi.com>
Acked-by: Don Brace <don.brace@microsemi.com>
Orabug: 23064595
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
drivers/scsi/hpsa.c

index f061459fd31fd7be19df640089242f4917811b89..d04f65efab713c75779b4501a4fcdeaa6e79b60d 100644 (file)
@@ -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;