From: Matt Reimer <mattjreimer@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: Matt Reimer <mreimer@vpop.net>
Subject: [PATCH] MTD: make s3c2410's correct_data indicate an error for multi-bit read errors
Date: Thu, 18 Oct 2007 18:02:44 -0700 [thread overview]
Message-ID: <1192755764-26269-2-git-send-email-mattjreimer@gmail.com> (raw)
In-Reply-To: <1192755764-26269-1-git-send-email-mattjreimer@gmail.com>
From: Matt Reimer <mreimer@vpop.net>
If there were multiple bit errors in the data s3c2410_nand_correct_data()
was returning 0 (no error) instead of -1, so the upper layers (like JFFS2)
would not know the data is corrupt.
Signed-off-by: Matt Reimer <mreimer@vpop.net>
---
drivers/mtd/nand/s3c2410.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 077fdcc..2e6b435 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -397,7 +397,7 @@ static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat,
if ((diff0 & ~(1<<fls(diff0))) == 0)
return 1;
- return 0;
+ return -1;
}
/* ECC functions
--
1.5.3.2
next prev parent reply other threads:[~2007-10-19 1:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-19 1:02 [PATCH] MTD: fix s3c2410 error correction Matt Reimer
2007-10-19 1:02 ` Matt Reimer [this message]
2007-10-25 18:16 ` Matt Reimer
2007-11-06 17:09 ` Matt Reimer
2007-11-06 18:11 ` Jörn Engel
2007-11-06 22:34 ` Matt Reimer
2007-11-06 23:26 ` Jörn Engel
2007-11-21 8:17 ` Matthieu CASTET
2007-11-29 19:10 ` Matt Reimer
2007-12-03 15:20 ` Jörn Engel
2007-12-10 19:09 ` Matt Reimer
2008-01-25 22:07 ` Matt Reimer
-- strict thread matches above, loose matches on Subject: below --
2007-10-19 1:13 [PATCH] MTD: make s3c2410's correct_data indicate an error for multi-bit read errors Matt Reimer
2007-10-19 8:24 ` Jörn Engel
2007-10-19 9:00 ` Artem Bityutskiy
2007-10-19 19:29 ` Matt Reimer
2007-10-20 10:28 ` Jörn Engel
2007-10-20 16:44 Matt Reimer
2007-10-20 16:49 ` Matt Reimer
2007-10-20 16:48 Matt Reimer
2007-10-25 18:12 ` Matt Reimer
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=1192755764-26269-2-git-send-email-mattjreimer@gmail.com \
--to=mattjreimer@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=mreimer@vpop.net \
/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