All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SCSI: ncr53c8xx: div reaches -1
@ 2009-02-11 12:22 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-02-11 12:22 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: linux-scsi, Andrew Morton

With while(--div >= 0) { ... } div reaches -1.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
index 3b7240e..e3c482a 100644
--- a/drivers/scsi/ncr53c8xx.c
+++ b/drivers/scsi/ncr53c8xx.c
@@ -5444,7 +5444,7 @@ static void ncr_getsync(struct ncb *np, u_char sfac, u_char *fakp, u_char *scntl
 	**	input speed faster than the period.
 	*/
 	kpc = per * clk;
-	while (--div >= 0)
+	while (--div > 0)
 		if (kpc >= (div_10M[div] << 2)) break;
 
 	/*

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-11 12:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-11 12:22 [PATCH] SCSI: ncr53c8xx: div reaches -1 Roel Kluin

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.