linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] microblaze: iowrite upon timeout
@ 2009-04-16 20:49 Roel Kluin
  2009-04-21  1:18 ` [microblaze-uclinux] " John Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-04-16 20:49 UTC (permalink / raw)
  To: monstr, microblaze-uclinux, lkml, Andrew Morton

retries reaches -1, so the iowrite occurrs upon timeout.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c
index 62cc789..4b0f0fd 100644
--- a/arch/microblaze/kernel/early_printk.c
+++ b/arch/microblaze/kernel/early_printk.c
@@ -36,7 +36,7 @@ static void early_printk_putc(char c)
 
 	unsigned retries = 10000;
 	/* read status bit - 0x8 offset */
-	while (retries-- && (in_be32(base_addr + 8) & (1 << 3)))
+	while (--retries && (in_be32(base_addr + 8) & (1 << 3)))
 		;
 
 	/* Only attempt the iowrite if we didn't timeout */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-21  1:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 20:49 [PATCH] microblaze: iowrite upon timeout Roel Kluin
2009-04-21  1:18 ` [microblaze-uclinux] " John Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).