public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Huang Shijie <b32955@freescale.com>
To: Elie De Brauwer <eliedebrauwer@gmail.com>
Cc: linux-mtd@lists.infradead.org, computersforpeace@gmail.com,
	dwmw2@infradead.org, dedekind1@gmail.com
Subject: Re: [PATCH v2] mtd: gpmi: Deal with bitflips in erased regions regions
Date: Tue, 17 Dec 2013 11:50:33 +0800	[thread overview]
Message-ID: <20131217035031.GE12575@shlinux2.ap.freescale.net> (raw)
In-Reply-To: <1387133061-6573-2-git-send-email-eliedebrauwer@gmail.com>

On Sun, Dec 15, 2013 at 07:44:21PM +0100, Elie De Brauwer wrote:
> @@ -1057,15 +1082,27 @@ static int gpmi_ecc_read_page(struct mtd_info *mtd, struct nand_chip *chip,
>  	status = auxiliary_virt + nfc_geo->auxiliary_status_offset;
>  
>  	for (i = 0; i < nfc_geo->ecc_chunk_count; i++, status++) {
> -		if ((*status == STATUS_GOOD) || (*status == STATUS_ERASED))
> +		if (*status == STATUS_GOOD)
>  			continue;
>  
>  		if (*status == STATUS_UNCORRECTABLE) {
>  			mtd->ecc_stats.failed++;
>  			continue;
>  		}
> -		mtd->ecc_stats.corrected += *status;
> -		max_bitflips = max_t(unsigned int, max_bitflips, *status);
> +
> +		if (*status == STATUS_ERASED)
> +			if (gpmi_allones(this))
> +				continue;
I think it is better to use "break" here, not "continue".

Since if the gpmi_allones() return true, it means all the ECC chunks are
0xff.

thanks
Huang Shijie.

      parent reply	other threads:[~2013-12-17  4:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-15 18:44 [PATCH v2] mtd: gpmi: Bitflip support in erased regions Elie De Brauwer
2013-12-15 18:44 ` [PATCH v2] mtd: gpmi: Deal with bitflips in erased regions regions Elie De Brauwer
2013-12-16  4:30   ` Huang Shijie
2013-12-16  9:43     ` Elie De Brauwer
2013-12-16 13:00       ` Huang Shijie
2013-12-16 13:14         ` Elie De Brauwer
2013-12-17  2:23           ` Huang Shijie
2013-12-17  2:29           ` Huang Shijie
2013-12-17  2:37           ` Huang Shijie
2013-12-17  6:35             ` Elie De Brauwer
2013-12-17  7:10     ` Brian Norris
2013-12-17  3:50   ` Huang Shijie [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=20131217035031.GE12575@shlinux2.ap.freescale.net \
    --to=b32955@freescale.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=eliedebrauwer@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /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