]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SCSI] pm80xx: Removing redundant code snippets
authorViswas G <Viswas.G@pmcs.com>
Wed, 27 Nov 2013 05:41:58 +0000 (11:11 +0530)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 17 Dec 2013 14:43:27 +0000 (06:43 -0800)
Removed redundant code snippets in pm8001_hwi.c
and pm8001_ctl.c

Signed-off-by: Viswas G <Viswas.G@pmcs.com>
Reviewed-by: Jack Wang <xjtuwjp@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/pm8001/pm8001_ctl.c
drivers/scsi/pm8001/pm8001_hwi.c

index a04b4ff8c7f627193c6829e2386c7c8e167632ee..1e055ae61cdc3331a92ab3b2aadf64311ea04dd4 100644 (file)
@@ -323,16 +323,13 @@ static ssize_t pm8001_ctl_ib_queue_log_show(struct device *cdev,
        int offset;
        char *str = buf;
        int start = 0;
-#define IB_MEMMAP(c)           \
-               (*(u32 *)((u8 *)pm8001_ha->             \
-               memoryMap.region[IB].virt_ptr +         \
+#define IB_MEMMAP(c)   \
+               (*(u32 *)((u8 *)pm8001_ha->     \
+               memoryMap.region[IB].virt_ptr + \
                pm8001_ha->evtlog_ib_offset + (c)))
 
        for (offset = 0; offset < IB_OB_READ_TIMES; offset++) {
-               if (pm8001_ha->chip_id != chip_8001)
-                       str += sprintf(str, "0x%08x\n", IB_MEMMAP(start));
-               else
-                       str += sprintf(str, "0x%08x\n", IB_MEMMAP(start));
+               str += sprintf(str, "0x%08x\n", IB_MEMMAP(start));
                start = start + 4;
        }
        pm8001_ha->evtlog_ib_offset += SYSFS_OFFSET;
@@ -363,16 +360,13 @@ static ssize_t pm8001_ctl_ob_queue_log_show(struct device *cdev,
        int offset;
        char *str = buf;
        int start = 0;
-#define OB_MEMMAP(c)           \
-               (*(u32 *)((u8 *)pm8001_ha->             \
-               memoryMap.region[OB].virt_ptr +         \
+#define OB_MEMMAP(c)   \
+               (*(u32 *)((u8 *)pm8001_ha->     \
+               memoryMap.region[OB].virt_ptr + \
                pm8001_ha->evtlog_ob_offset + (c)))
 
        for (offset = 0; offset < IB_OB_READ_TIMES; offset++) {
-               if (pm8001_ha->chip_id != chip_8001)
-                       str += sprintf(str, "0x%08x\n", OB_MEMMAP(start));
-               else
-                       str += sprintf(str, "0x%08x\n", OB_MEMMAP(start));
+               str += sprintf(str, "0x%08x\n", OB_MEMMAP(start));
                start = start + 4;
        }
        pm8001_ha->evtlog_ob_offset += SYSFS_OFFSET;
index 0a1296a87d66d5919859ea586a8637109b537c50..2aa068112bda1d637a9af39766c051809f5049c7 100644 (file)
@@ -5072,13 +5072,8 @@ pm8001_get_gsm_dump(struct device *cdev, u32 length, char *buf)
                direct_data += sprintf(direct_data, "%08x ", value);
        }
        /* Shift back to BAR4 original address */
-       if (pm8001_ha->chip_id == chip_8001) {
-               if (-1 == pm8001_bar4_shift(pm8001_ha, 0))
+       if (-1 == pm8001_bar4_shift(pm8001_ha, 0))
                        return 1;
-       } else {
-               if (-1 == pm80xx_bar4_shift(pm8001_ha, 0))
-                       return 1;
-       }
        pm8001_ha->fatal_forensic_shift_offset += 1024;
 
        if (pm8001_ha->fatal_forensic_shift_offset >= 0x100000)