From: Roel Kluin Date: Thu, 16 Apr 2009 20:49:17 +0000 (+0200) Subject: microblaze: iowrite upon timeout X-Git-Tag: firefly_0821_release~14340^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6e60c14810d8da792e418fdcb2110b4185d1b9a2;p=firefly-linux-kernel-4.4.55.git microblaze: iowrite upon timeout retries reaches -1, so the iowrite occurrs upon timeout. Acked-by: John Williams Signed-off-by: Roel Kluin Signed-off-by: Michal Simek --- diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c index 62cc78993f44..4b0f0fdb9ca0 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 */