]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: Simplify statements that return a boolean
authorBart Van Assche <bvanassche@acm.org>
Tue, 19 Apr 2022 22:57:47 +0000 (15:57 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Apr 2022 03:23:02 +0000 (23:23 -0400)
commit0c1418088d7638bdf295a80c799bfbb2bbd09aa8
treebd94e34bc36e0e31d58912c317537bbe3d9ca027
parent447c6e1506afec46da69573539d2c6eae96834c9
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>
drivers/scsi/ufs/ufs-qcom.h
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshpb.c