* [PATCH] rtc: rtc-nuc900: fix loop timeout test
@ 2017-06-23 8:29 Dan Carpenter
2017-07-05 21:09 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-06-23 8:29 UTC (permalink / raw)
To: Wan ZongShun
Cc: Alessandro Zummo, Alexandre Belloni, linux-rtc, kernel-janitors
We should change this post-op to a pre-op because we want the loop to
exit with "timeout" set to zero.
Fixes: 0a89b55364e0 ("nuc900/rtc: change the waiting for device ready implement")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c
index b1b6b3041bfb..4ed81117cf5f 100644
--- a/drivers/rtc/rtc-nuc900.c
+++ b/drivers/rtc/rtc-nuc900.c
@@ -93,7 +93,7 @@ static int *check_rtc_access_enable(struct nuc900_rtc *nuc900_rtc)
__raw_writel(AERPOWERON, nuc900_rtc->rtc_reg + REG_RTC_AER);
while (!(__raw_readl(nuc900_rtc->rtc_reg + REG_RTC_AER) & AERRWENB)
- && timeout--)
+ && --timeout)
mdelay(1);
if (!timeout)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc: rtc-nuc900: fix loop timeout test
2017-06-23 8:29 [PATCH] rtc: rtc-nuc900: fix loop timeout test Dan Carpenter
@ 2017-07-05 21:09 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2017-07-05 21:09 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Wan ZongShun, Alessandro Zummo, linux-rtc, kernel-janitors
On 23/06/2017 at 11:29:00 +0300, Dan Carpenter wrote:
> We should change this post-op to a pre-op because we want the loop to
> exit with "timeout" set to zero.
>
> Fixes: 0a89b55364e0 ("nuc900/rtc: change the waiting for device ready implement")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Applied, thanks.
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-05 21:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-23 8:29 [PATCH] rtc: rtc-nuc900: fix loop timeout test Dan Carpenter
2017-07-05 21:09 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox