Skip to contentSkip to conversation

mtdswap: kill strip error handling option

PATCH In review Yang Ruirui 2 participants 3 messages Mar 14, 2011 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mtdswap: kill strip error handling option

From: Yang Ruirui<[email protected]>

As Artem Bityutskiy's suggestion, The strict erase error handling option does not make much sense.

Here kill the option, and still keep the retry times as before.

---
 drivers/mtd/Kconfig   |    8 --------
 drivers/mtd/mtdswap.c |    8 +-------
 2 files changed, 1 insertion(+), 15 deletions(-)
drivers/mtd/mtdswap.c +1 -7
@@ -156,12 +156,6 @@ struct mtdswap_oobdata {
 #define MTDSWAP_ERASE_RETRIES	3 /* Before marking erase block bad */
 #define MTDSWAP_IO_RETRIES	3
 
-#ifdef CONFIG_MTD_SWAP_STRICT
-#define MTDSWAP_STRICT		1
-#else
-#define MTDSWAP_STRICT		0
-#endif
-
 enum {
 	MTDSWAP_SCANNED_CLEAN,
 	MTDSWAP_SCANNED_DIRTY,
@@ -575,7 +569,7 @@ retry:
 
 	ret = mtd->erase(mtd, &erase);
 	if (ret) {
-		if (retries++ < MTDSWAP_ERASE_RETRIES && !MTDSWAP_STRICT) {
+		if (retries++ < MTDSWAP_ERASE_RETRIES) {
 			dev_warn(d->dev,
 				"erase of erase block %#llx on %s failed",
 				erase.addr, mtd->name);
drivers/mtd/Kconfig +0 -8
@@ -335,14 +335,6 @@ config MTD_SWAP
 	  The driver provides wear leveling by storing erase counter into the
 	  OOB.
 
-config MTD_SWAP_STRICT
-       bool "Strict erase error handling"
-       depends on MTD_SWAP
-       help
-	 Enables strict tolerance on failed erasures, marking erase blocks bad
-	 right after the first failed operation. With non-strict mode the
-	 erase operation is retried.
-
 source "drivers/mtd/chips/Kconfig"
 
 source "drivers/mtd/maps/Kconfig"
#1 lore raw
Quoted 4 lines · Yang Ruirui

From: Yang Ruirui<[email protected]>

As Artem Bityutskiy's suggestion, The strict erase error handling option does not make much sense.

Well, I does make sense, but we just have no prove it is any useful, this is why I suggested to kill it.

Quoted 8 lines

Here kill the option, and still keep the retry times as before.

---
 drivers/mtd/Kconfig   |    8 --------
 drivers/mtd/mtdswap.c |    8 +-------
 2 files changed, 1 insertion(+), 15 deletions(-)

Thank, I've amended the commit message and pushed to my l2-mtd-2.6.git tree.

Artem.

#2 lore raw
Quoted 12 lines · Artem Bityutskiy
Quoted 4 lines · Yang Ruirui

From: Yang Ruirui<[email protected]>

As Artem Bityutskiy's suggestion, The strict erase error handling option does not make much sense.

Well, I does make sense, but we just have no prove it is any useful, this is why I suggested to kill it.

Quoted 3 lines

Here kill the option, and still keep the retry times as before.

Quoted 8 lines
Quoted 5 lines
---
  drivers/mtd/Kconfig   |    8 --------
  drivers/mtd/mtdswap.c |    8 +-------
  2 files changed, 1 insertion(+), 15 deletions(-)

Thank, I've amended the commit message and pushed to my l2-mtd-2.6.git tree.

Thanks about that.

Quoted 3 lines

Artem.

Signature · 2 lines
Thanks
Yang Ruirui