From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Mike Dunn <mikedunn@newsguy.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH 7/7] mtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN
Date: Wed, 25 Apr 2012 20:27:18 +0200 [thread overview]
Message-ID: <871unbis55.fsf@free.fr> (raw)
In-Reply-To: <1335295105-7981-8-git-send-email-mikedunn@newsguy.com> (Mike Dunn's message of "Tue, 24 Apr 2012 12:18:25 -0700")
Mike Dunn <mikedunn@newsguy.com> writes:
One little trick with docg3 patch part:
> diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
> index 3414031..7644d59 100644
> --- a/drivers/mtd/devices/docg3.c
> +++ b/drivers/mtd/devices/docg3.c
> @@ -948,7 +949,8 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t from,
> }
> if (ret > 0) {
> mtd->ecc_stats.corrected += ret;
> - ret = -EUCLEAN;
> + max_bitflips = max(max_bitflips, ret);
> + ret = max_bitflips;
> }
> }
If you do set ret here, the next loop you'll do in the following statement
" while (!ret && (len > 0 || ooblen > 0)) {" will exit because ret is not
0.
I think you should change :
>- while (!ret && (len > 0 || ooblen > 0)) {" will exit because ret is not
into
>- while (ret >= 0 && (len > 0 || ooblen > 0)) {".
With that change, please add my:
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cheers.
--
Robert
PS: It's really a great work that bitflip serie
next prev parent reply other threads:[~2012-04-25 18:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 19:18 [PATCH 0/7] mtd: Change meaning of -EUCLEAN return code on reads Mike Dunn
2012-04-24 19:18 ` [PATCH 1/7] mtd: ecc_strength is at ecc step granularity Mike Dunn
2012-04-24 19:18 ` [PATCH 2/7] mtd: nand: fix incorrect ecc strength values Mike Dunn
2012-05-01 19:07 ` Jiandong Zheng
2012-04-24 19:18 ` [PATCH 3/7] mtd: expose ecc_strength through sysfs Mike Dunn
2012-04-24 19:18 ` [PATCH 4/7] mtd: bitflip threshold added to mtd_info and sysfs Mike Dunn
2012-04-24 19:18 ` [PATCH 5/7] mtd: nand: read_page() returns max_bitflips Mike Dunn
2012-04-24 19:45 ` Scott Wood
2012-04-25 15:35 ` Mike Dunn
2012-04-25 9:20 ` Shmulik Ladkani
2012-04-24 19:18 ` [PATCH 6/7] mtd: nand: sanity checks of ecc strength in nand_scan_tail() Mike Dunn
2012-04-25 4:09 ` Brian Norris
2012-04-25 15:08 ` Mike Dunn
2012-04-24 19:18 ` [PATCH 7/7] mtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN Mike Dunn
2012-04-25 10:14 ` Shmulik Ladkani
2012-04-25 18:27 ` Robert Jarzmik [this message]
2012-04-25 19:13 ` Mike Dunn
2012-04-29 19:24 ` Artem Bityutskiy
2012-04-30 19:55 ` Mike Dunn
2012-04-30 20:31 ` Robert Jarzmik
2012-05-01 12:20 ` Artem Bityutskiy
2012-05-01 17:27 ` Mike Dunn
2012-05-01 18:51 ` Shmulik Ladkani
2012-05-02 3:59 ` Artem Bityutskiy
2012-04-25 11:23 ` [PATCH 0/7] mtd: Change meaning of -EUCLEAN return code on reads Ivan Djelic
2012-04-25 15:56 ` Mike Dunn
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=871unbis55.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=linux-mtd@lists.infradead.org \
--cc=mikedunn@newsguy.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;
as well as URLs for NNTP newsgroup(s).