From a858af9a9e01972c33f61036a3de6f707184e51b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 19 Apr 2022 15:57:47 -0700 Subject: 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 Reviewed-by: Bjorn Andersson Reviewed-by: Keoseong Park Reviewed-by: Bean Huo Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen --- drivers/scsi/ufs/ufs-qcom.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/scsi/ufs/ufs-qcom.h') 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 */ -- cgit v1.2.3