@@ -2095,7 +2095,7 @@ static int megasas_slave_configure(struct scsi_device *sdev)
if ((instance->tgt_prop) && (instance->nvme_page_size))
ret_target_prop = megasas_get_target_prop(instance, sdev);
- is_target_prop = (ret_target_prop == DCMD_SUCCESS) ? true : false;
+ is_target_prop = ret_target_prop == DCMD_SUCCESS;
megasas_set_static_target_properties(sdev, is_target_prop);
/* This sdev property may change post OCR */
@@ -3446,7 +3446,7 @@ enable_sdev_max_qd_store(struct device *cdev,
shost_for_each_device(sdev, shost) {
ret_target_prop = megasas_get_target_prop(instance, sdev);
- is_target_prop = (ret_target_prop == DCMD_SUCCESS) ? true : false;
+ is_target_prop = ret_target_prop == DCMD_SUCCESS;
megasas_set_fw_assisted_qd(sdev, is_target_prop);
}
mutex_unlock(&instance->reset_mutex);
@@ -2832,7 +2832,7 @@ megasas_build_ldio_fusion(struct megasas_instance *instance,
} else {
if (MR_BuildRaidContext(instance, &io_info, rctx,
local_map_ptr, &raidLUN))
- fp_possible = (io_info.fpOkForIo > 0) ? true : false;
+ fp_possible = io_info.fpOkForIo > 0;
}
megasas_get_msix_index(instance, scp, cmd, io_info.data_arms);
@@ -5115,7 +5115,7 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int reason)
(instance->nvme_page_size))
ret_target_prop = megasas_get_target_prop(instance, sdev);
- is_target_prop = (ret_target_prop == DCMD_SUCCESS) ? true : false;
+ is_target_prop = ret_target_prop == DCMD_SUCCESS;
megasas_set_dynamic_target_properties(sdev, is_target_prop);
}
Ther are a little ternary operators, the true or false judgement of which is unnecessary in C language semantics. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 4 ++-- drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)