All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: lpc32xx: drop bitflip_threshold initialization
@ 2014-05-28  8:52 Brian Norris
  2014-07-03  0:25 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Norris @ 2014-05-28  8:52 UTC (permalink / raw)
  To: linux-mtd; +Cc: Roland Stigge, Brian Norris

These drivers don't need to explicitly initialize their bitflip
thresholds. The comment is no longer correct, since nand_scan_tail()
performs this initialization as of the following commit:

    commit ea3b2ea24ef0f2ef9c6795b19cff456195b6728a
    Author: Shmulik Ladkani <shmulik@jungo.com>
    Date:   Fri Jun 8 18:29:06 2012 +0300

        mtd: nand: initialize bitflip_threshold prior to BBT scanning

(It seems there were some parallel efforts on writing/submitting these
drivers, and Shmulik's bug fix.)

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Roland Stigge <stigge@antcom.de>
---
Not tested

 drivers/mtd/nand/lpc32xx_mlc.c | 6 ------
 drivers/mtd/nand/lpc32xx_slc.c | 6 ------
 2 files changed, 12 deletions(-)

diff --git a/drivers/mtd/nand/lpc32xx_mlc.c b/drivers/mtd/nand/lpc32xx_mlc.c
index 687478c9f09c..7335346dc126 100644
--- a/drivers/mtd/nand/lpc32xx_mlc.c
+++ b/drivers/mtd/nand/lpc32xx_mlc.c
@@ -721,12 +721,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
 	nand_chip->bbt_td = &lpc32xx_nand_bbt;
 	nand_chip->bbt_md = &lpc32xx_nand_bbt_mirror;
 
-	/* bitflip_threshold's default is defined as ecc_strength anyway.
-	 * Unfortunately, it is set only later at add_mtd_device(). Meanwhile
-	 * being 0, it causes bad block table scanning errors in
-	 * nand_scan_tail(), so preparing it here. */
-	mtd->bitflip_threshold = nand_chip->ecc.strength;
-
 	if (use_dma) {
 		res = lpc32xx_dma_setup(host);
 		if (res) {
diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c
index 53a6742e3da3..8caef28e0756 100644
--- a/drivers/mtd/nand/lpc32xx_slc.c
+++ b/drivers/mtd/nand/lpc32xx_slc.c
@@ -840,12 +840,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
 	chip->ecc.strength = 1;
 	chip->ecc.hwctl = lpc32xx_nand_ecc_enable;
 
-	/* bitflip_threshold's default is defined as ecc_strength anyway.
-	 * Unfortunately, it is set only later at add_mtd_device(). Meanwhile
-	 * being 0, it causes bad block table scanning errors in
-	 * nand_scan_tail(), so preparing it here already. */
-	mtd->bitflip_threshold = chip->ecc.strength;
-
 	/*
 	 * Allocate a large enough buffer for a single huge page plus
 	 * extra space for the spare area and ECC storage area
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: lpc32xx: drop bitflip_threshold initialization
  2014-05-28  8:52 [PATCH] mtd: lpc32xx: drop bitflip_threshold initialization Brian Norris
@ 2014-07-03  0:25 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2014-07-03  0:25 UTC (permalink / raw)
  To: linux-mtd; +Cc: Roland Stigge

On Wed, May 28, 2014 at 01:52:25AM -0700, Brian Norris wrote:
> These drivers don't need to explicitly initialize their bitflip
> thresholds. The comment is no longer correct, since nand_scan_tail()
> performs this initialization as of the following commit:
> 
>     commit ea3b2ea24ef0f2ef9c6795b19cff456195b6728a
>     Author: Shmulik Ladkani <shmulik@jungo.com>
>     Date:   Fri Jun 8 18:29:06 2012 +0300
> 
>         mtd: nand: initialize bitflip_threshold prior to BBT scanning
> 
> (It seems there were some parallel efforts on writing/submitting these
> drivers, and Shmulik's bug fix.)
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> Cc: Roland Stigge <stigge@antcom.de>

Pushed to l2-mtd.git.

Brian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-03  0:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-28  8:52 [PATCH] mtd: lpc32xx: drop bitflip_threshold initialization Brian Norris
2014-07-03  0:25 ` Brian Norris

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.