From: Sascha Hauer <s.hauer@pengutronix.de>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: linux-mtd@lists.infradead.org, David.Woodhouse@intel.com
Subject: Re: [PATCH] max_retries reaches -1, not 0
Date: Wed, 11 Feb 2009 09:54:21 +0100 [thread overview]
Message-ID: <20090211085421.GA23048@pengutronix.de> (raw)
In-Reply-To: <499202F4.3020408@gmail.com>
On Tue, Feb 10, 2009 at 11:43:00PM +0100, Roel Kluin wrote:
> With while (max_retries-- > 0) { ... } max_retries reaches -1, not 0,
> so we shouldn't DEBUG() on a max_retries of 0.
Yes, indeed.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> 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);
> }
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2009-02-11 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-10 22:43 [PATCH] max_retries reaches -1, not 0 Roel Kluin
2009-02-11 8:54 ` Sascha Hauer [this message]
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=20090211085421.GA23048@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=David.Woodhouse@intel.com \
--cc=linux-mtd@lists.infradead.org \
--cc=roel.kluin@gmail.com \
/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