All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dz: test after postfix decrement fails in dz_console_putchar()
@ 2008-04-09 10:00 Roel Kluin
  2008-04-09 13:37 ` Maciej W. Rozycki
  2008-04-09 13:41 ` Johannes Weiner
  0 siblings, 2 replies; 4+ messages in thread
From: Roel Kluin @ 2008-04-09 10:00 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: lkml

When loops reaches 0 the postfix decrement still subtracts, so the test fails

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c
index 116211f..0dddd68 100644
--- a/drivers/serial/dz.c
+++ b/drivers/serial/dz.c
@@ -819,7 +819,7 @@ static void dz_console_putchar(struct uart_port *uport, int ch)
 		dz_out(dport, DZ_TCR, mask);
 		iob();
 		udelay(2);
-	} while (loops--);
+	} while (--loops);
 
 	if (loops)				/* Cannot send otherwise. */
 		dz_out(dport, DZ_TDR, ch);

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

end of thread, other threads:[~2008-04-09 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-09 10:00 [PATCH] dz: test after postfix decrement fails in dz_console_putchar() Roel Kluin
2008-04-09 13:37 ` Maciej W. Rozycki
2008-04-09 13:41 ` Johannes Weiner
2008-04-09 14:35   ` Maciej W. Rozycki

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.