diff options
author | Bart Van Assche <bvanassche@acm.org> | 2022-04-20 01:57:47 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-04-26 06:23:02 +0300 |
commit | a858af9a9e01972c33f61036a3de6f707184e51b (patch) | |
tree | bd94e34bc36e0e31d58912c317537bbe3d9ca027 /drivers/scsi/ufs/ufs-qcom.h | |
parent | 51d1628fc4572705daabac18a7935b661baae1a0 (diff) | |
download | linux-a858af9a9e01972c33f61036a3de6f707184e51b.tar.xz |
scsi: ufs: Simplify statements that return a boolean
Convert "if (expr) return true; else return false;" into "return expr;" if
either 'expr' is a boolean expression or the return type of the function is
'bool'.
Link: https://lore.kernel.org/r/20220419225811.4127248-5-bvanassche@acm.org
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Keoseong Park <keosung.park@samsung.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs-qcom.h')
-rw-r--r-- | drivers/scsi/ufs/ufs-qcom.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/scsi/ufs/ufs-qcom.h b/drivers/scsi/ufs/ufs-qcom.h index 8208e3a3ef59..51570224a6e2 100644 --- a/drivers/scsi/ufs/ufs-qcom.h +++ b/drivers/scsi/ufs/ufs-qcom.h @@ -239,10 +239,7 @@ int ufs_qcom_testbus_config(struct ufs_qcom_host *host); static inline bool ufs_qcom_cap_qunipro(struct ufs_qcom_host *host) { - if (host->caps & UFS_QCOM_CAP_QUNIPRO) - return true; - else - return false; + return host->caps & UFS_QCOM_CAP_QUNIPRO; } /* ufs-qcom-ice.c */ |