summaryrefslogtreecommitdiff
path: root/drivers/scsi/pmcraid.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2017-08-13 04:26:32 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-25 05:29:05 +0300
commitdb269932b97e8e7d2bc974dc6a63cb795ddd7e54 (patch)
tree9de62464b39c4e72ac6cdb0036ed345163273e74 /drivers/scsi/pmcraid.c
parent60747936bd5c0f7de2179f7076fe89ad93675680 (diff)
downloadlinux-db269932b97e8e7d2bc974dc6a63cb795ddd7e54.tar.xz
scsi: pmcraid: fix duplicated code for different branches
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>
Diffstat (limited to 'drivers/scsi/pmcraid.c')
-rw-r--r--drivers/scsi/pmcraid.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 1f8b1533d0c4..b4d6cd8cd1ad 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -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;
}