From: Bragatheswaran Manickavel <bragathemanick0908@gmail.com>
To: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org,
jejb@linux.ibm.com, martin.petersen@oracle.com,
stanley.chu@mediatek.com, mani@kernel.org, quic_cang@quicinc.com,
quic_asutoshd@quicinc.com, peter.wang@mediatek.com,
beanhuo@micron.com, quic_nguyenb@quicinc.com,
Arthur.Simchaev@wdc.com
Cc: Bragatheswaran Manickavel <bragathemanick0908@gmail.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ufs/core: ufshcd: Conversion to bool not necessary
Date: Wed, 25 Oct 2023 00:04:01 +0530 [thread overview]
Message-ID: <20231024183401.48888-1-bragathemanick0908@gmail.com> (raw)
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>
---
drivers/ufs/core/ufshcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 406885671665..bbd8e83be6c6 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;
}
/**
--
2.34.1
next reply other threads:[~2023-10-24 18:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 18:34 Bragatheswaran Manickavel [this message]
2023-10-24 18:59 ` [PATCH] ufs/core: ufshcd: Conversion to bool not necessary Bart Van Assche
2023-10-25 2:44 ` Martin K. Petersen
2023-10-25 3:51 ` Bragatheswaran Manickavel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231024183401.48888-1-bragathemanick0908@gmail.com \
--to=bragathemanick0908@gmail.com \
--cc=Arthur.Simchaev@wdc.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@mediatek.com \
--cc=quic_asutoshd@quicinc.com \
--cc=quic_cang@quicinc.com \
--cc=quic_nguyenb@quicinc.com \
--cc=stanley.chu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox