All of lore.kernel.org
 help / color / mirror / Atom feed
From: roel.kluin@gmail.com (Roel Kluin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] icst307: Add missing increment
Date: Mon, 26 Oct 2009 22:33:04 +0100	[thread overview]
Message-ID: <4AE61590.2030603@gmail.com> (raw)

Without this increment the loop can only break if it does in the
first iteration.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/arch/arm/common/icst307.c b/arch/arm/common/icst307.c
index 6d094c1..b255fbf 100644
--- a/arch/arm/common/icst307.c
+++ b/arch/arm/common/icst307.c
@@ -55,7 +55,7 @@ icst307_khz_to_vco(const struct icst307_params *p, unsigned long freq)
 		 */
 		if (f > 6000 && f <= p->vco_max)
 			break;
-	} while (i < ARRAY_SIZE(idx2s));
+	} while (++i < ARRAY_SIZE(idx2s));
 
 	if (i >= ARRAY_SIZE(idx2s))
 		return vco;
@@ -117,7 +117,7 @@ icst307_ps_to_vco(const struct icst307_params *p, unsigned long period)
 		 */
 		if (f >= ps && f < 1000000000UL / 6000 + 1)
 			break;
-	} while (i < ARRAY_SIZE(idx2s));
+	} while (++i < ARRAY_SIZE(idx2s));
 
 	if (i >= ARRAY_SIZE(idx2s))
 		return vco;

WARNING: multiple messages have this Message-ID (diff)
From: Roel Kluin <roel.kluin@gmail.com>
To: Russell King <linux@arm.linux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] icst307: Add missing increment
Date: Mon, 26 Oct 2009 22:33:04 +0100	[thread overview]
Message-ID: <4AE61590.2030603@gmail.com> (raw)

Without this increment the loop can only break if it does in the
first iteration.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/arch/arm/common/icst307.c b/arch/arm/common/icst307.c
index 6d094c1..b255fbf 100644
--- a/arch/arm/common/icst307.c
+++ b/arch/arm/common/icst307.c
@@ -55,7 +55,7 @@ icst307_khz_to_vco(const struct icst307_params *p, unsigned long freq)
 		 */
 		if (f > 6000 && f <= p->vco_max)
 			break;
-	} while (i < ARRAY_SIZE(idx2s));
+	} while (++i < ARRAY_SIZE(idx2s));
 
 	if (i >= ARRAY_SIZE(idx2s))
 		return vco;
@@ -117,7 +117,7 @@ icst307_ps_to_vco(const struct icst307_params *p, unsigned long period)
 		 */
 		if (f >= ps && f < 1000000000UL / 6000 + 1)
 			break;
-	} while (i < ARRAY_SIZE(idx2s));
+	} while (++i < ARRAY_SIZE(idx2s));
 
 	if (i >= ARRAY_SIZE(idx2s))
 		return vco;

             reply	other threads:[~2009-10-26 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26 21:33 Roel Kluin [this message]
2009-10-26 21:33 ` [PATCH] icst307: Add missing increment Roel Kluin
2009-10-26 21:46 ` [PATCH] icst525: " Roel Kluin
2009-10-26 21:46   ` Roel Kluin
2009-10-27 19:38   ` Russell King - ARM Linux
2009-10-27 19:38     ` Russell King - ARM Linux
2009-10-27 19:38 ` [PATCH] icst307: " Russell King - ARM Linux
2009-10-27 19:38   ` Russell King - ARM Linux

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=4AE61590.2030603@gmail.com \
    --to=roel.kluin@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.