From: Vivek Gautam <vivek.gautam@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Yendapally Reddy Dhananjaya Reddy
<yendapally.reddy@broadcom.com>, Heiko Stuebner <heiko@sntech.de>,
Florian Fainelli <f.fainelli@gmail.com>,
Axel Lin <axel.lin@ingics.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] phy: brcm-sata: fix a timeout test in init
Date: Tue, 20 Jun 2017 14:26:15 +0530 [thread overview]
Message-ID: <c13b054d-2713-8303-c599-96d315521736@codeaurora.org> (raw)
In-Reply-To: <20170620084257.mr2xzz6lqlmp6rlc@mwanda>
On 06/20/2017 02:12 PM, Dan Carpenter wrote:
> On Tue, Jun 20, 2017 at 01:56:35PM +0530, Vivek Gautam wrote:
>>
>> On 06/19/2017 04:26 PM, Dan Carpenter wrote:
>>> We want to timeout with try set to zero so this should be a pre-op
>>> instead of post-op.
>>>
>>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>>
>>> diff --git a/drivers/phy/broadcom/phy-brcm-sata.c b/drivers/phy/broadcom/phy-brcm-sata.c
>>> index ccbc3d994998..48fb016ce689 100644
>>> --- a/drivers/phy/broadcom/phy-brcm-sata.c
>>> +++ b/drivers/phy/broadcom/phy-brcm-sata.c
>>> @@ -329,7 +329,7 @@ static int brcm_nsp_sata_init(struct brcm_sata_port *port)
>>> /* Wait for pll_seq_done bit */
>>> try = 50;
>>> - while (try--) {
>>> + while (--try) {
>> Do we want to try reading the status 50 times? If yes, won't your change
>> break that? It will rather run the loop 49 times.
>>
> Yeah. I know. I'm pretty sure that 50 is a rough number, and not an
> exact thing.
Right, I agree that this must be rough count.
nice catch btw.
Best regards
Vivek
>
> regards,
> dan carpenter
>
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
prev parent reply other threads:[~2017-06-20 8:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-19 10:56 Dan Carpenter
2017-06-20 8:26 ` Vivek Gautam
2017-06-20 8:42 ` Dan Carpenter
2017-06-20 8:56 ` Vivek Gautam [this message]
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=c13b054d-2713-8303-c599-96d315521736@codeaurora.org \
--to=vivek.gautam@codeaurora.org \
--cc=axel.lin@ingics.com \
--cc=dan.carpenter@oracle.com \
--cc=f.fainelli@gmail.com \
--cc=heiko@sntech.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yendapally.reddy@broadcom.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®