From patchwork Wed Feb 25 13:06:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 8737 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1PD6dZw021965 for ; Wed, 25 Feb 2009 13:06:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752922AbZBYNGj (ORCPT ); Wed, 25 Feb 2009 08:06:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753106AbZBYNGj (ORCPT ); Wed, 25 Feb 2009 08:06:39 -0500 Received: from qw-out-2122.google.com ([74.125.92.27]:64507 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752922AbZBYNGi (ORCPT ); Wed, 25 Feb 2009 08:06:38 -0500 Received: by qw-out-2122.google.com with SMTP id 5so17471qwi.37 for ; Wed, 25 Feb 2009 05:06:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=z/c/1d+GpMYhev8qsCkUCrEz2307eU4DB5V5Q9LwxOE=; b=bMZhTuAXq+F8pJJ2foR8eTsOSGrYp5S23VsAmnATMnY1LJXzs8VBC0LeMN0lg/kOmb fV0TMNsbmKFelQIrrLYLAAc3wrKEIyPzS62Lpi01j3TXTS/kJQI9BEhVfpqEryTNRs73 jRDccdiqshRTQ3Db6LuPRN9ewli1SMU+piSSM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=Ul6SZZswfXzm1F29X0sUrqqHGIhOc5jBI2uN++rZ1bO8ykpx3QQirzrveg1ga67PQD +p0m7MWq7nrkNRjP3vJg8K8q72noIE8rXHYZ3DTB+XLJS//9kpQ6WxqQpvawsABTOhA+ Kxl2XdvGLT0DNzBG64faPj6Vvm1FVTRI27c80= Received: by 10.224.67.142 with SMTP id r14mr176314qai.284.1235567196643; Wed, 25 Feb 2009 05:06:36 -0800 (PST) Received: from ?192.168.1.115? (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id u1sm14028733uge.2.2009.02.25.05.06.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Feb 2009 05:06:36 -0800 (PST) Message-ID: <49A5425C.9050405@gmail.com> Date: Wed, 25 Feb 2009 14:06:36 +0100 From: Roel Kluin User-Agent: Thunderbird 2.0.0.18 (X11/20081105) MIME-Version: 1.0 To: rmk+kernel@arm.linux.org.uk CC: linux-omap@vger.kernel.org, Andrew Morton Subject: [PATCH] omap2: off by 1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 --- arch/arm/mach-omap2/clock.c | 2 +- arch/arm/mach-omap2/powerdomain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index ce4d46a..da185ff 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -202,7 +202,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;