diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-09-02 19:11:20 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-10-19 10:19:56 -0400 |
commit | 74d82d2660058e32644f0c673656b2a1d01d3688 (patch) | |
tree | 8b90af4d6014ea50d74c504dc832cf3a9c3fff10 /drivers/mtd/ubi/ubi.h | |
parent | 756e1df1d2b8b572a92dd1b82d2a432d5b280b1c (diff) |
UBI: remove duplicate IO error codes
The 'UBI_IO_PEB_EMPTY' and 'UBI_IO_PEB_FREE' are essentially the same
and mean that there are only 0xFF bytes instead of headers. Simplify
UBI a little by turning them into a single 'UBI_IO_FF' error code.
Also, stop maintaining commentaries in 'ubi_io_read_vid_hdr()' which are
almost identical to commentaries in 'ubi_io_read_ec_hdr()'.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index 24a7c7647cb7..774bdcad6a07 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -85,10 +85,7 @@ | |||
85 | /* | 85 | /* |
86 | * Error codes returned by the I/O sub-system. | 86 | * Error codes returned by the I/O sub-system. |
87 | * | 87 | * |
88 | * UBI_IO_PEB_EMPTY: the physical eraseblock is empty, i.e. it contains only | 88 | * UBI_IO_FF: the read region of flash contains only 0xFFs |
89 | * %0xFF bytes | ||
90 | * UBI_IO_PEB_FREE: the physical eraseblock is free, i.e. it contains only a | ||
91 | * valid erase counter header, and the rest are %0xFF bytes | ||
92 | * UBI_IO_BAD_HDR: the EC or VID header is corrupted (bad magic or CRC) | 89 | * UBI_IO_BAD_HDR: the EC or VID header is corrupted (bad magic or CRC) |
93 | * UBI_IO_BAD_HDR_EBADMSG: the same as %UBI_IO_BAD_HDR, but also there was a | 90 | * UBI_IO_BAD_HDR_EBADMSG: the same as %UBI_IO_BAD_HDR, but also there was a |
94 | * data integrity error reported by the MTD driver | 91 | * data integrity error reported by the MTD driver |
@@ -96,8 +93,7 @@ | |||
96 | * UBI_IO_BITFLIPS: bit-flips were detected and corrected | 93 | * UBI_IO_BITFLIPS: bit-flips were detected and corrected |
97 | */ | 94 | */ |
98 | enum { | 95 | enum { |
99 | UBI_IO_PEB_EMPTY = 1, | 96 | UBI_IO_FF = 1, |
100 | UBI_IO_PEB_FREE, | ||
101 | UBI_IO_BAD_HDR, | 97 | UBI_IO_BAD_HDR, |
102 | UBI_IO_BAD_HDR_EBADMSG, | 98 | UBI_IO_BAD_HDR_EBADMSG, |
103 | UBI_IO_BITFLIPS | 99 | UBI_IO_BITFLIPS |