projects/linux·commit 6997283f

scsi: ufs: core: Conversion to bool not necessary

6997283f · Bragatheswaran Manickavel <[email protected]> · 2023-10-25 00:04:01 +05:30

A logical evaluation already results in bool. There is no need for using a
ternary operator based evaluation and bool conversion of the outcome.

Issue identified using boolconv.cocci Coccinelle semantic patch.

Signed-off-by: Bragatheswaran Manickavel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Commit
6997283f64d968cf6bc8a68876930f67f48e1a6c
Parents
a5181c89

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/ufs/core/ufshcd.cmodified+1−1View file

drivers/ufs/core/ufshcd.c

View file
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 24aa7a2..5c1be0a 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -2406,7 +2406,7 @@ static inline bool ufshcd_ready_for_uic_cmd(struct ufs_hba *hba)
int ret = read_poll_timeout(ufshcd_readl, val, val & UIC_COMMAND_READY,
500, UIC_CMD_TIMEOUT * 1000, false, hba,
REG_CONTROLLER_STATUS);
- return ret == 0 ? true : false;
+ return ret == 0;
}
/**