From: Adrian Hunter <adrian.hunter@intel.com>
To: Bart Van Assche <bvanassche@acm.org>,
Kiwoong Kim <kwmad.kim@samsung.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, beanhuo@micron.com,
sc.suh@samsung.com, hy50.seo@samsung.com, sh425.lee@samsung.com,
kwangwon.min@samsung.com, junwoo80.lee@samsung.com,
wkon.kim@samsung.com
Subject: Re: [RESEND PATCH v3 2/2] ufs: poll HCS.UCRDY before issuing a UIC command
Date: Thu, 17 Aug 2023 19:16:53 +0300 [thread overview]
Message-ID: <817a6dda-c227-8f90-97f3-204c7d03fb54@intel.com> (raw)
In-Reply-To: <b9ade5d5-a160-5ecb-8dc5-777e8a586d51@acm.org>
On 17/08/23 18:02, Bart Van Assche wrote:
> On 8/14/23 04:26, Adrian Hunter wrote:
>> And perhaps the following is neater:
>>
>> u32 val;
>>
>> return !read_poll_timeout(ufshcd_readl, val, val & UIC_COMMAND_READY,
>> 500, UIC_CMD_TIMEOUT * 1000, false, hba,
>> REG_CONTROLLER_STATUS);
>
> Would the above make readers of that code wonder whether read_poll_timeout()
> perhaps returns a boolean? Wouldn't it be better to test the
> read_poll_timeout() return value as follows?
>
> return read_poll_timeout(ufshcd_readl, val, val & UIC_COMMAND_READY,
> 500, UIC_CMD_TIMEOUT * 1000, false, hba,
> REG_CONTROLLER_STATUS) == 0;
>
Either is fine, otherwise:
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
next prev parent reply other threads:[~2023-08-17 16:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230802013848epcas2p3a896970d5bdc8e3f3e422c84c282a151@epcas2p3.samsung.com>
2023-08-02 1:28 ` [RESEND PATCH v3 0/2] change UIC command handling Kiwoong Kim
[not found] ` <CGME20230802013850epcas2p4a813b26e15c261d180ee3b46651e1534@epcas2p4.samsung.com>
2023-08-02 1:28 ` [RESEND PATCH v3 1/2] ufs: make __ufshcd_send_uic_cmd not wrapped by host_lock Kiwoong Kim
[not found] ` <CGME20230802013852epcas2p2334d33036d7d1a0bdbefaf5bb844928e@epcas2p2.samsung.com>
2023-08-02 1:28 ` [RESEND PATCH v3 2/2] ufs: poll HCS.UCRDY before issuing a UIC command Kiwoong Kim
2023-08-14 11:26 ` Adrian Hunter
2023-08-17 15:02 ` Bart Van Assche
2023-08-17 16:16 ` Adrian Hunter [this message]
2023-09-04 1:30 [RESEND PATCH v3 0/2] change UIC command handling Kiwoong Kim
[not found] ` <CGME20230904014150epcas2p251f19c2220ec8938559bc2873e8e265a@epcas2p2.samsung.com>
2023-09-04 1:30 ` [RESEND PATCH v3 2/2] ufs: poll HCS.UCRDY before issuing a UIC command Kiwoong Kim
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=817a6dda-c227-8f90-97f3-204c7d03fb54@intel.com \
--to=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=hy50.seo@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=junwoo80.lee@samsung.com \
--cc=kwangwon.min@samsung.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sc.suh@samsung.com \
--cc=sh425.lee@samsung.com \
--cc=wkon.kim@samsung.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
all inboxes | Powered by JetHome®