Skip to content

Commit 6997283

Browse files
bragathemanickmartinkpetersen
authored andcommitted
scsi: ufs: core: Conversion to bool not necessary
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 <bragathemanick0908@gmail.com> Link: https://lore.kernel.org/r/20231024183401.48888-1-bragathemanick0908@gmail.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent a5181c8 commit 6997283

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2406,7 +2406,7 @@ static inline bool ufshcd_ready_for_uic_cmd(struct ufs_hba *hba)
24062406
int ret = read_poll_timeout(ufshcd_readl, val, val & UIC_COMMAND_READY,
24072407
500, UIC_CMD_TIMEOUT * 1000, false, hba,
24082408
REG_CONTROLLER_STATUS);
2409-
return ret == 0 ? true : false;
2409+
return ret == 0;
24102410
}
24112411

24122412
/**

0 commit comments

Comments
 (0)