struct ufs_qcom_host *host = ufshcd_get_variant(hba);
struct phy *phy = host->generic_phy;
int ret = 0;
- bool is_rate_B = (UFS_QCOM_LIMIT_HS_RATE == PA_HS_MODE_B)
- ? true : false;
+ bool is_rate_B = UFS_QCOM_LIMIT_HS_RATE == PA_HS_MODE_B;
/* Reset UFS Host Controller and PHY */
ret = ufs_qcom_host_reset(hba);
*/
static inline bool ufshcd_is_device_present(struct ufs_hba *hba)
{
- return (ufshcd_readl(hba, REG_CONTROLLER_STATUS) &
- DEVICE_PRESENT) ? true : false;
+ return ufshcd_readl(hba, REG_CONTROLLER_STATUS) & DEVICE_PRESENT;
}
/**
static inline bool ufshcd_is_exception_event(struct utp_upiu_rsp *ucd_rsp_ptr)
{
return be32_to_cpu(ucd_rsp_ptr->header.dword_2) &
- MASK_RSP_EXCEPTION_EVENT ? true : false;
+ MASK_RSP_EXCEPTION_EVENT;
}
/**
}
/* Decide based on the rounded-off frequency and update */
- scale_up = (*freq == clki->max_freq) ? true : false;
+ scale_up = *freq == clki->max_freq;
if (!scale_up)
*freq = clki->min_freq;
/* Update the frequency */
lrbp->sense_buffer = cmd->sense_buffer;
lrbp->task_tag = tag;
lrbp->lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun);
- lrbp->intr_cmd = !ufshcd_is_intr_aggr_allowed(hba) ? true : false;
+ lrbp->intr_cmd = !ufshcd_is_intr_aggr_allowed(hba);
ufshcd_prepare_lrbp_crypto(scsi_cmd_to_rq(cmd), lrbp);
static inline bool ufshcd_is_auto_hibern8_enabled(struct ufs_hba *hba)
{
- return FIELD_GET(UFSHCI_AHIBERN8_TIMER_MASK, hba->ahit) ? true : false;
+ return FIELD_GET(UFSHCI_AHIBERN8_TIMER_MASK, hba->ahit);
}
static inline bool ufshcd_is_wb_allowed(struct ufs_hba *hba)