public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
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: Sat, 20 Oct 2007 09:44:47 -0700	[thread overview]
Message-ID: <1192898687-12818-1-git-send-email-mattjreimer@gmail.com> (raw)

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..1aa3a18 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 -EBADMSG;
 }
 
 /* ECC functions
-- 
1.5.3.2

             reply	other threads:[~2007-10-20 16:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-20 16:44 Matt Reimer [this message]
2007-10-20 16:49 ` [PATCH] MTD: make s3c2410's correct_data indicate an error for multi-bit read errors Matt Reimer
  -- strict thread matches above, loose matches on Subject: below --
2007-10-20 16:48 Matt Reimer
2007-10-25 18:12 ` Matt Reimer
2007-10-19  1:13 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-19  1:02 [PATCH] MTD: fix s3c2410 error correction Matt Reimer
2007-10-19  1:02 ` [PATCH] MTD: make s3c2410's correct_data indicate an error for multi-bit read errors 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=1192898687-12818-1-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