From 74d82d2660058e32644f0c673656b2a1d01d3688 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 3 Sep 2010 02:11:20 +0300 Subject: 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 --- drivers/mtd/ubi/ubi.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers/mtd/ubi/ubi.h') diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index 24a7c7647cb..774bdcad6a0 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h @@ -85,10 +85,7 @@ /* * Error codes returned by the I/O sub-system. * - * UBI_IO_PEB_EMPTY: the physical eraseblock is empty, i.e. it contains only - * %0xFF bytes - * UBI_IO_PEB_FREE: the physical eraseblock is free, i.e. it contains only a - * valid erase counter header, and the rest are %0xFF bytes + * UBI_IO_FF: the read region of flash contains only 0xFFs * UBI_IO_BAD_HDR: the EC or VID header is corrupted (bad magic or CRC) * UBI_IO_BAD_HDR_EBADMSG: the same as %UBI_IO_BAD_HDR, but also there was a * data integrity error reported by the MTD driver @@ -96,8 +93,7 @@ * UBI_IO_BITFLIPS: bit-flips were detected and corrected */ enum { - UBI_IO_PEB_EMPTY = 1, - UBI_IO_PEB_FREE, + UBI_IO_FF = 1, UBI_IO_BAD_HDR, UBI_IO_BAD_HDR_EBADMSG, UBI_IO_BITFLIPS -- cgit v1.2.3-70-g09d2