Skip to content

Commit

Permalink
UBI: rename sv to av
Browse files Browse the repository at this point in the history
After re-naming the 'struct ubi_scan_volume' we should adjust all variables
named 'sv' to something else, because 'sv' stands for "scanning volume".
Let's rename it to 'av' which stands for "attaching volume" which is
a bit more consistent and has the same length, which makes re-naming easy.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
  • Loading branch information
Artem Bityutskiy committed May 20, 2012
1 parent a4e6042 commit 517af48
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 182 deletions.
22 changes: 11 additions & 11 deletions drivers/mtd/ubi/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,20 @@ void ubi_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx)
}

/**
* ubi_dump_sv - dump a &struct ubi_ainf_volume object.
* @sv: the object to dump
* ubi_dump_av - dump a &struct ubi_ainf_volume object.
* @av: the object to dump
*/
void ubi_dump_sv(const struct ubi_ainf_volume *sv)
void ubi_dump_av(const struct ubi_ainf_volume *av)
{
printk(KERN_DEBUG "Volume attaching information dump:\n");
printk(KERN_DEBUG "\tvol_id %d\n", sv->vol_id);
printk(KERN_DEBUG "\thighest_lnum %d\n", sv->highest_lnum);
printk(KERN_DEBUG "\tleb_count %d\n", sv->leb_count);
printk(KERN_DEBUG "\tcompat %d\n", sv->compat);
printk(KERN_DEBUG "\tvol_type %d\n", sv->vol_type);
printk(KERN_DEBUG "\tused_ebs %d\n", sv->used_ebs);
printk(KERN_DEBUG "\tlast_data_size %d\n", sv->last_data_size);
printk(KERN_DEBUG "\tdata_pad %d\n", sv->data_pad);
printk(KERN_DEBUG "\tvol_id %d\n", av->vol_id);
printk(KERN_DEBUG "\thighest_lnum %d\n", av->highest_lnum);
printk(KERN_DEBUG "\tleb_count %d\n", av->leb_count);
printk(KERN_DEBUG "\tcompat %d\n", av->compat);
printk(KERN_DEBUG "\tvol_type %d\n", av->vol_type);
printk(KERN_DEBUG "\tused_ebs %d\n", av->used_ebs);
printk(KERN_DEBUG "\tlast_data_size %d\n", av->last_data_size);
printk(KERN_DEBUG "\tdata_pad %d\n", av->data_pad);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/ubi/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);

void ubi_dump_vol_info(const struct ubi_volume *vol);
void ubi_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx);
void ubi_dump_sv(const struct ubi_ainf_volume *sv);
void ubi_dump_av(const struct ubi_ainf_volume *av);
void ubi_dump_aeb(const struct ubi_ainf_peb *aeb, int type);
void ubi_dump_mkvol_req(const struct ubi_mkvol_req *req);
int ubi_self_check_all_ff(struct ubi_device *ubi, int pnum, int offset,
Expand Down
10 changes: 5 additions & 5 deletions drivers/mtd/ubi/eba.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ static void print_rsvd_warning(struct ubi_device *ubi,
int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_attach_info *ai)
{
int i, j, err, num_volumes;
struct ubi_ainf_volume *sv;
struct ubi_ainf_volume *av;
struct ubi_volume *vol;
struct ubi_ainf_peb *aeb;
struct rb_node *rb;
Expand Down Expand Up @@ -1246,17 +1246,17 @@ int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_attach_info *ai)
for (j = 0; j < vol->reserved_pebs; j++)
vol->eba_tbl[j] = UBI_LEB_UNMAPPED;

sv = ubi_scan_find_sv(ai, idx2vol_id(ubi, i));
if (!sv)
av = ubi_scan_find_av(ai, idx2vol_id(ubi, i));
if (!av)
continue;

ubi_rb_for_each_entry(rb, aeb, &sv->root, u.rb) {
ubi_rb_for_each_entry(rb, aeb, &av->root, u.rb) {
if (aeb->lnum >= vol->reserved_pebs)
/*
* This may happen in case of an unclean reboot
* during re-size.
*/
ubi_scan_move_to_list(sv, aeb, &ai->erase);
ubi_scan_move_to_list(av, aeb, &ai->erase);
vol->eba_tbl[aeb->lnum] = aeb->pnum;
}
}
Expand Down
Loading

0 comments on commit 517af48

Please sign in to comment.