diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-09-03 01:30:16 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-10-19 17:19:56 +0300 |
commit | 756e1df1d2b8b572a92dd1b82d2a432d5b280b1c (patch) | |
tree | e1109e8a31f72bb3c50b2001f28983c1bdfba1a9 /drivers/mtd/ubi/scan.c | |
parent | c174a08c72ae77a05be59d0d810dc13239b81e8e (diff) | |
download | linux-stable-756e1df1d2b8b572a92dd1b82d2a432d5b280b1c.tar.gz linux-stable-756e1df1d2b8b572a92dd1b82d2a432d5b280b1c.tar.bz2 linux-stable-756e1df1d2b8b572a92dd1b82d2a432d5b280b1c.zip |
UBI: rename IO error code
Rename UBI_IO_BAD_HDR_READ into UBI_IO_BAD_HDR_EBADMSG which is presumably more
self-documenting and readable. Indeed, the '_READ' suffix does not tell much and
even confuses, while '_EBADMSG' tells about uncorrectable ECC error, because we
use -EBADMSG all over the place to represent ECC errors.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r-- | drivers/mtd/ubi/scan.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index 69b52e9c9489..7e7c56d162ec 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c @@ -750,7 +750,7 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, bitflips = 1; else if (err == UBI_IO_PEB_EMPTY) return add_to_list(si, pnum, UBI_SCAN_UNKNOWN_EC, &si->erase); - else if (err == UBI_IO_BAD_HDR_READ || err == UBI_IO_BAD_HDR) { + else if (err == UBI_IO_BAD_HDR_EBADMSG || err == UBI_IO_BAD_HDR) { /* * We have to also look at the VID header, possibly it is not * corrupted. Set %bitflips flag in order to make this PEB be @@ -816,11 +816,11 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, return err; else if (err == UBI_IO_BITFLIPS) bitflips = 1; - else if (err == UBI_IO_BAD_HDR_READ || err == UBI_IO_BAD_HDR || + else if (err == UBI_IO_BAD_HDR_EBADMSG || err == UBI_IO_BAD_HDR || (err == UBI_IO_PEB_FREE && ec_corr)) { /* VID header is corrupted */ - if (err == UBI_IO_BAD_HDR_READ || - ec_corr == UBI_IO_BAD_HDR_READ) + if (err == UBI_IO_BAD_HDR_EBADMSG || + ec_corr == UBI_IO_BAD_HDR_EBADMSG) si->read_err_count += 1; err = add_to_list(si, pnum, ec, &si->corr); if (err) |