aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-05-05 10:36:17 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-07-18 09:53:00 -0400
commit79b510c0f21174f4bd055d1aab156e548ae3a5f2 (patch)
tree08246f4e5ef5e59d8dc497717e3881ce997d88d3 /drivers/mtd/ubi
parent941dfb07ed91451b1c58626a0d258dfdf468b593 (diff)
UBI: add few more comments
Add few comments above ubi_scan_add_used() to explain why it is so complex. Requested by Satyam Sharma <satyam.sharma@gmail.com>. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/scan.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 197cd650356b..b24af2104a2a 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -407,8 +407,12 @@ out_free_vidh:
407 * @vid_hdr: the volume identifier header 407 * @vid_hdr: the volume identifier header
408 * @bitflips: if bit-flips were detected when this physical eraseblock was read 408 * @bitflips: if bit-flips were detected when this physical eraseblock was read
409 * 409 *
410 * This function returns zero in case of success and a negative error code in 410 * This function adds information about a used physical eraseblock to the
411 * case of failure. 411 * 'used' tree of the corresponding volume. The function is rather complex
412 * because it has to handle cases when this is not the first physical
413 * eraseblock belonging to the same logical eraseblock, and the newer one has
414 * to be picked, while the older one has to be dropped. This function returns
415 * zero in case of success and a negative error code in case of failure.
412 */ 416 */
413int ubi_scan_add_used(const struct ubi_device *ubi, struct ubi_scan_info *si, 417int ubi_scan_add_used(const struct ubi_device *ubi, struct ubi_scan_info *si,
414 int pnum, int ec, const struct ubi_vid_hdr *vid_hdr, 418 int pnum, int ec, const struct ubi_vid_hdr *vid_hdr,