Commit 13d33dad authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBI: make ubi_scan_erase_peb static and rename

The 'ubi_scan_erase_peb()' is used only in scan.c so can be static. Also
re-name it to 'early_erase_peb()' because we tend to use "ubi_" prefix only for
non-static fuction and also because the new name is better.
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent 517af48c
...@@ -667,7 +667,7 @@ void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av) ...@@ -667,7 +667,7 @@ void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av)
} }
/** /**
* ubi_scan_erase_peb - erase a physical eraseblock. * early_erase_peb - erase a physical eraseblock.
* @ubi: UBI device description object * @ubi: UBI device description object
* @ai: attaching information * @ai: attaching information
* @pnum: physical eraseblock number to erase; * @pnum: physical eraseblock number to erase;
...@@ -679,8 +679,8 @@ void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av) ...@@ -679,8 +679,8 @@ void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av)
* This function returns zero in case of success and a negative error code in * This function returns zero in case of success and a negative error code in
* case of failure. * case of failure.
*/ */
int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_attach_info *ai, static int early_erase_peb(struct ubi_device *ubi,
int pnum, int ec) const struct ubi_attach_info *ai, int pnum, int ec)
{ {
int err; int err;
struct ubi_ec_hdr *ec_hdr; struct ubi_ec_hdr *ec_hdr;
...@@ -748,7 +748,7 @@ struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi, ...@@ -748,7 +748,7 @@ struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi,
if (aeb->ec == UBI_SCAN_UNKNOWN_EC) if (aeb->ec == UBI_SCAN_UNKNOWN_EC)
aeb->ec = ai->mean_ec; aeb->ec = ai->mean_ec;
err = ubi_scan_erase_peb(ubi, ai, aeb->pnum, aeb->ec+1); err = early_erase_peb(ubi, ai, aeb->pnum, aeb->ec+1);
if (err) if (err)
continue; continue;
......
...@@ -167,8 +167,6 @@ struct ubi_ainf_peb *ubi_scan_find_aeb(const struct ubi_ainf_volume *av, ...@@ -167,8 +167,6 @@ struct ubi_ainf_peb *ubi_scan_find_aeb(const struct ubi_ainf_volume *av,
void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av); void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av);
struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi, struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi,
struct ubi_attach_info *ai); struct ubi_attach_info *ai);
int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_attach_info *ai,
int pnum, int ec);
struct ubi_attach_info *ubi_scan(struct ubi_device *ubi); struct ubi_attach_info *ubi_scan(struct ubi_device *ubi);
void ubi_scan_destroy_ai(struct ubi_attach_info *ai); void ubi_scan_destroy_ai(struct ubi_attach_info *ai);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment