From: Paul Walmsley <paul@pwsan.com>
To: linux-arm-kernel@lists.arm.linux.org.uk
Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
Roel Kluin <roel.kluin@gmail.com>, Paul Walmsley <paul@pwsan.com>
Subject: [PATCH 10/10] OMAP2 clock/powerdomain: off by 1 error in loop timeout comparisons
Date: Tue, 26 May 2009 16:12:37 -0600 [thread overview]
Message-ID: <20090526221236.25381.46396.stgit@localhost.localdomain> (raw)
In-Reply-To: <20090526220517.25381.75976.stgit@localhost.localdomain>
From: Roel Kluin <roel.kluin@gmail.com>
with while (i++ < MAX_CLOCK_ENABLE_WAIT); i can reach MAX_CLOCK_ENABLE_WAIT + 1
after the loop, so if (i == MAX_CLOCK_ENABLE_WAIT) that's still success.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/mach-omap2/clock.c | 2 +-
arch/arm/mach-omap2/powerdomain.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 076f0a7..3c70c33 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -302,7 +302,7 @@ int omap2_wait_clock_ready(void __iomem *reg, u32 mask, const char *name)
udelay(1);
}
- if (i < MAX_CLOCK_ENABLE_WAIT)
+ if (i <= MAX_CLOCK_ENABLE_WAIT)
pr_debug("Clock %s stable after %d loops\n", name, i);
else
printk(KERN_ERR "Clock %s didn't enable in %d tries\n",
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 73e2971..983f1cb 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -1099,7 +1099,7 @@ int pwrdm_wait_transition(struct powerdomain *pwrdm)
(c++ < PWRDM_TRANSITION_BAILOUT))
udelay(1);
- if (c >= PWRDM_TRANSITION_BAILOUT) {
+ if (c > PWRDM_TRANSITION_BAILOUT) {
printk(KERN_ERR "powerdomain: waited too long for "
"powerdomain %s to complete transition\n", pwrdm->name);
return -EAGAIN;
next prev parent reply other threads:[~2009-05-26 22:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-26 22:12 [PATCH 00/10] OMAP clock/powerdomain/SDRC patches for post-2.6.30 Paul Walmsley
2009-05-26 22:12 ` [PATCH 01/10] OMAP3 clock: remove wait for DPLL3 M2 clock to stabilize Paul Walmsley
2009-05-26 22:12 ` [PATCH 02/10] OMAP3 clock: initialize SDRC timings at kernel start Paul Walmsley
2009-05-26 22:12 ` [PATCH 03/10] OMAP3 clock: add a short delay when lowering CORE clk rate Paul Walmsley
2009-05-26 22:12 ` [PATCH 04/10] OMAP3 clock/SDRC: program SDRC_MR register during SDRC clock change Paul Walmsley
2009-05-26 22:12 ` [PATCH 05/10] OMAP3 SRAM: add more comments on the SRAM code Paul Walmsley
2009-05-26 22:12 ` [PATCH 06/10] OMAP3 SRAM: convert SRAM code to use macros rather than magic numbers Paul Walmsley
2009-05-26 22:12 ` [PATCH 07/10] OMAP3: Add support for DPLL3 divisor values higher than 2 Paul Walmsley
2009-05-26 22:12 ` [PATCH 08/10] OMAP3 SDRC: set FIXEDDELAY when disabling SDRC DLL Paul Walmsley
2009-05-26 22:12 ` [PATCH 09/10] OMAP3 clock: GPIO de-bounce clocks don't affect module idle state Paul Walmsley
2009-05-26 22:12 ` Paul Walmsley [this message]
2009-06-01 16:56 ` [PATCH 00/10] OMAP clock/powerdomain/SDRC patches for post-2.6.30 Tony Lindgren
2009-06-01 17:08 ` Russell King - ARM Linux
2009-06-01 17:18 ` Tony Lindgren
2009-06-09 7:12 ` Paul Walmsley
2009-06-18 5:48 ` Tony Lindgren
2009-06-19 16:23 ` Russell King - ARM Linux
2009-06-19 16:36 ` Jean Pihet
2009-06-23 22:04 ` Paul Walmsley
2009-06-20 1:21 ` Paul Walmsley
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=20090526221236.25381.46396.stgit@localhost.localdomain \
--to=paul@pwsan.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=roel.kluin@gmail.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