public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v1] mtd: nandbiterrs: Have init function return 0 on success
@ 2016-12-13 14:36 Marc Gonzalez
  2016-12-19 10:30 ` Marc Gonzalez
  2016-12-19 12:20 ` Boris Brezillon
  0 siblings, 2 replies; 5+ messages in thread
From: Marc Gonzalez @ 2016-12-13 14:36 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger; +Cc: linux-mtd, Iwo Mergler, Brian Norris

The init function currently returns -EIO on success. This behavior
was probably chosen in order to avoid a subsequent rmmod, but this
complicates failure detection from user-space.

Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
---
I'm not sure failures are reported as expected. I would expect
the test to report a failure if the driver cannot fix less than
$STRENGTH bit flips, but it doesn't, AFAICT.
cf. incremental_errors_test which sets err to 0 in the 
"After %d biterrors per subpage, read reported error %d\n"
code path.
---
 drivers/mtd/tests/nandbiterrs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mtd/tests/nandbiterrs.c b/drivers/mtd/tests/nandbiterrs.c
index f26dec896afa..41050bcae9f1 100644
--- a/drivers/mtd/tests/nandbiterrs.c
+++ b/drivers/mtd/tests/nandbiterrs.c
@@ -403,7 +403,6 @@ static int __init mtd_nandbiterrs_init(void)
 	if (err)
 		goto exit_error;
 
-	err = -EIO;
 	pr_info("finished successfully.\n");
 	printk(KERN_INFO "==================================================\n");
 
-- 
2.10.0

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

end of thread, other threads:[~2016-12-19 16:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-13 14:36 [PATCH v1] mtd: nandbiterrs: Have init function return 0 on success Marc Gonzalez
2016-12-19 10:30 ` Marc Gonzalez
2016-12-19 10:33   ` Richard Weinberger
2016-12-19 12:20 ` Boris Brezillon
2016-12-19 16:23   ` Marc Gonzalez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox