diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-04-30 09:50:22 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-06-04 04:30:42 -0400 |
commit | 786d78318586cbdc8aec539fe5a4942490267fef (patch) | |
tree | 3ca3144ce0186dea041782b8a9789caf16d89cbb /drivers/mtd/ubi/ubi.h | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) |
UBI: simplify IO error codes
We do not really need 2 separate error codes for indicating bad VID
and bad EC headers (UBI_IO_BAD_EC_HDR, UBI_IO_BAD_VID_HDR), it is
enough to have only one UBI_IO_BAD_HDR return code.
This patch does not introduce any functional change, only some
code simplification.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reviewed-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index a637f0283add..539b3f6c7a56 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -89,16 +89,13 @@ | |||
89 | * %0xFF bytes | 89 | * %0xFF bytes |
90 | * UBI_IO_PEB_FREE: the physical eraseblock is free, i.e. it contains only a | 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 | 91 | * valid erase counter header, and the rest are %0xFF bytes |
92 | * UBI_IO_BAD_EC_HDR: the erase counter header is corrupted (bad magic or CRC) | 92 | * UBI_IO_BAD_HDR: the EC or VID header is corrupted (bad magic or CRC) |
93 | * UBI_IO_BAD_VID_HDR: the volume identifier header is corrupted (bad magic or | ||
94 | * CRC) | ||
95 | * UBI_IO_BITFLIPS: bit-flips were detected and corrected | 93 | * UBI_IO_BITFLIPS: bit-flips were detected and corrected |
96 | */ | 94 | */ |
97 | enum { | 95 | enum { |
98 | UBI_IO_PEB_EMPTY = 1, | 96 | UBI_IO_PEB_EMPTY = 1, |
99 | UBI_IO_PEB_FREE, | 97 | UBI_IO_PEB_FREE, |
100 | UBI_IO_BAD_EC_HDR, | 98 | UBI_IO_BAD_HDR, |
101 | UBI_IO_BAD_VID_HDR, | ||
102 | UBI_IO_BITFLIPS | 99 | UBI_IO_BITFLIPS |
103 | }; | 100 | }; |
104 | 101 | ||