public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Roel Kluin <roel.kluin@gmail.com>
To: s.hauer@pengutronix.de, David.Woodhouse@intel.com
Cc: linux-mtd@lists.infradead.org
Subject: [PATCH] max_retries reaches -1, not 0
Date: Tue, 10 Feb 2009 23:43:00 +0100	[thread overview]
Message-ID: <499202F4.3020408@gmail.com> (raw)

With while (max_retries-- > 0) { ... } max_retries reaches -1, not 0,
so we shouldn't DEBUG() on a max_retries of 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 21fd4f1..5c34148 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -192,7 +192,7 @@ static void wait_op_done(struct mxc_nand_host *host, int max_retries,
 			}
 			udelay(1);
 		}
-		if (max_retries <= 0)
+		if (max_retries < 0)
 			DEBUG(MTD_DEBUG_LEVEL0, "%s(%d): INT not set\n",
 			      __func__, param);
 	}

             reply	other threads:[~2009-02-10 22:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10 22:43 Roel Kluin [this message]
2009-02-11  8:54 ` [PATCH] max_retries reaches -1, not 0 Sascha Hauer

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=499202F4.3020408@gmail.com \
    --to=roel.kluin@gmail.com \
    --cc=David.Woodhouse@intel.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox