Skip to content

Commit

Permalink
UBI: add few more comments
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jul 18, 2007
1 parent 941dfb0 commit 79b510c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/mtd/ubi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,12 @@ static int compare_lebs(const struct ubi_device *ubi,
* @vid_hdr: the volume identifier header
* @bitflips: if bit-flips were detected when this physical eraseblock was read
*
* This function returns zero in case of success and a negative error code in
* case of failure.
* This function adds information about a used physical eraseblock to the
* 'used' tree of the corresponding volume. The function is rather complex
* because it has to handle cases when this is not the first physical
* eraseblock belonging to the same logical eraseblock, and the newer one has
* to be picked, while the older one has to be dropped. This function returns
* zero in case of success and a negative error code in case of failure.
*/
int ubi_scan_add_used(const struct ubi_device *ubi, struct ubi_scan_info *si,
int pnum, int ec, const struct ubi_vid_hdr *vid_hdr,
Expand Down

0 comments on commit 79b510c

Please sign in to comment.