scsi: pmcraid: fix duplicated code for different branches
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Sun, 13 Aug 2017 01:26:32 +0000 (20:26 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 02:29:05 +0000 (22:29 -0400)
Refactor code in order to avoid identical code for different branches.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pmcraid.c

index 1f8b1533d0c4dda406dae5fb52acecd3064f44fb..b4d6cd8cd1ad5bc1ad0590ecefb31e6809a5c3f3 100644 (file)
@@ -1595,12 +1595,7 @@ static void pmcraid_handle_config_change(struct pmcraid_instance *pinstance)
        if (pinstance->ccn.hcam->notification_type ==
            NOTIFICATION_TYPE_ENTRY_CHANGED &&
            cfg_entry->resource_type == RES_TYPE_VSET) {
-
-               if (fw_version <= PMCRAID_FW_VERSION_1)
-                       hidden_entry = (cfg_entry->unique_flags1 & 0x80) != 0;
-               else
-                       hidden_entry = (cfg_entry->unique_flags1 & 0x80) != 0;
-
+               hidden_entry = (cfg_entry->unique_flags1 & 0x80) != 0;
        } else if (!pmcraid_expose_resource(fw_version, cfg_entry)) {
                goto out_notify_apps;
        }