Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305166
b: refs/heads/master
c: cb28a93
h: refs/heads/master
v: v3
  • Loading branch information
Artem Bityutskiy committed May 20, 2012
1 parent 511665a commit 775ee59
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 227423d2416651abeafb5fd0c88c50eb0b99cb97
refs/heads/master: cb28a9322dd26cb6c29b7dda9a42626daca1024a
4 changes: 2 additions & 2 deletions trunk/drivers/mtd/ubi/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ void ubi_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx)
}

/**
* ubi_dump_sv - dump a &struct ubi_scan_volume object.
* ubi_dump_sv - dump a &struct ubi_ainf_volume object.
* @sv: the object to dump
*/
void ubi_dump_sv(const struct ubi_scan_volume *sv)
void ubi_dump_sv(const struct ubi_ainf_volume *sv)
{
printk(KERN_DEBUG "Volume scanning information dump:\n");
printk(KERN_DEBUG "\tvol_id %d\n", sv->vol_id);
Expand Down
2 changes: 1 addition & 1 deletion trunk/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_scan_volume *sv);
void ubi_dump_sv(const struct ubi_ainf_volume *sv);
void ubi_dump_seb(const struct ubi_ainf_peb *seb, 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
2 changes: 1 addition & 1 deletion trunk/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_scan_info *si)
{
int i, j, err, num_volumes;
struct ubi_scan_volume *sv;
struct ubi_ainf_volume *sv;
struct ubi_volume *vol;
struct ubi_ainf_peb *seb;
struct rb_node *rb;
Expand Down
36 changes: 18 additions & 18 deletions trunk/drivers/mtd/ubi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
* headers and providing complete information about the UBI flash image.
*
* The scanning information is represented by a &struct ubi_scan_info' object.
* Information about found volumes is represented by &struct ubi_scan_volume
* Information about found volumes is represented by &struct ubi_ainf_volume
* objects which are kept in volume RB-tree with root at the @volumes field.
* The RB-tree is indexed by the volume ID.
*
* Scanned logical eraseblocks are represented by &struct ubi_ainf_peb objects.
* These objects are kept in per-volume RB-trees with the root at the
* corresponding &struct ubi_scan_volume object. To put it differently, we keep
* corresponding &struct ubi_ainf_volume object. To put it differently, we keep
* an RB-tree of per-volume objects and each of these objects is the root of
* RB-tree of per-eraseblock objects.
*
Expand Down Expand Up @@ -180,7 +180,7 @@ static int add_corrupted(struct ubi_scan_info *si, int pnum, int ec)
* headers of the same volume.
*/
static int validate_vid_hdr(const struct ubi_vid_hdr *vid_hdr,
const struct ubi_scan_volume *sv, int pnum)
const struct ubi_ainf_volume *sv, int pnum)
{
int vol_type = vid_hdr->vol_type;
int vol_id = be32_to_cpu(vid_hdr->vol_id);
Expand Down Expand Up @@ -244,19 +244,19 @@ static int validate_vid_hdr(const struct ubi_vid_hdr *vid_hdr,
* to the scanning volume object in case of success and a negative error code
* in case of failure.
*/
static struct ubi_scan_volume *add_volume(struct ubi_scan_info *si, int vol_id,
static struct ubi_ainf_volume *add_volume(struct ubi_scan_info *si, int vol_id,
int pnum,
const struct ubi_vid_hdr *vid_hdr)
{
struct ubi_scan_volume *sv;
struct ubi_ainf_volume *sv;
struct rb_node **p = &si->volumes.rb_node, *parent = NULL;

ubi_assert(vol_id == be32_to_cpu(vid_hdr->vol_id));

/* Walk the volume RB-tree to look if this volume is already present */
while (*p) {
parent = *p;
sv = rb_entry(parent, struct ubi_scan_volume, rb);
sv = rb_entry(parent, struct ubi_ainf_volume, rb);

if (vol_id == sv->vol_id)
return sv;
Expand All @@ -268,7 +268,7 @@ static struct ubi_scan_volume *add_volume(struct ubi_scan_info *si, int vol_id,
}

/* The volume is absent - add it */
sv = kmalloc(sizeof(struct ubi_scan_volume), GFP_KERNEL);
sv = kmalloc(sizeof(struct ubi_ainf_volume), GFP_KERNEL);
if (!sv)
return ERR_PTR(-ENOMEM);

Expand Down Expand Up @@ -446,7 +446,7 @@ int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si,
{
int err, vol_id, lnum;
unsigned long long sqnum;
struct ubi_scan_volume *sv;
struct ubi_ainf_volume *sv;
struct ubi_ainf_peb *seb;
struct rb_node **p, *parent = NULL;

Expand Down Expand Up @@ -593,14 +593,14 @@ int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si,
* This function returns a pointer to the volume description or %NULL if there
* are no data about this volume in the scanning information.
*/
struct ubi_scan_volume *ubi_scan_find_sv(const struct ubi_scan_info *si,
struct ubi_ainf_volume *ubi_scan_find_sv(const struct ubi_scan_info *si,
int vol_id)
{
struct ubi_scan_volume *sv;
struct ubi_ainf_volume *sv;
struct rb_node *p = si->volumes.rb_node;

while (p) {
sv = rb_entry(p, struct ubi_scan_volume, rb);
sv = rb_entry(p, struct ubi_ainf_volume, rb);

if (vol_id == sv->vol_id)
return sv;
Expand All @@ -622,7 +622,7 @@ struct ubi_scan_volume *ubi_scan_find_sv(const struct ubi_scan_info *si,
* This function returns a pointer to the scanning logical eraseblock or %NULL
* if there are no data about it in the scanning volume information.
*/
struct ubi_ainf_peb *ubi_scan_find_seb(const struct ubi_scan_volume *sv,
struct ubi_ainf_peb *ubi_scan_find_seb(const struct ubi_ainf_volume *sv,
int lnum)
{
struct ubi_ainf_peb *seb;
Expand All @@ -648,7 +648,7 @@ struct ubi_ainf_peb *ubi_scan_find_seb(const struct ubi_scan_volume *sv,
* @si: scanning information
* @sv: the volume scanning information to delete
*/
void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_scan_volume *sv)
void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_ainf_volume *sv)
{
struct rb_node *rb;
struct ubi_ainf_peb *seb;
Expand Down Expand Up @@ -1147,7 +1147,7 @@ struct ubi_scan_info *ubi_scan(struct ubi_device *ubi)
{
int err, pnum;
struct rb_node *rb1, *rb2;
struct ubi_scan_volume *sv;
struct ubi_ainf_volume *sv;
struct ubi_ainf_peb *seb;
struct ubi_scan_info *si;

Expand Down Expand Up @@ -1244,7 +1244,7 @@ struct ubi_scan_info *ubi_scan(struct ubi_device *ubi)
* This function destroys the volume RB-tree (@sv->root) and the scanning
* volume information.
*/
static void destroy_sv(struct ubi_scan_info *si, struct ubi_scan_volume *sv)
static void destroy_sv(struct ubi_scan_info *si, struct ubi_ainf_volume *sv)
{
struct ubi_ainf_peb *seb;
struct rb_node *this = sv->root.rb_node;
Expand Down Expand Up @@ -1277,7 +1277,7 @@ static void destroy_sv(struct ubi_scan_info *si, struct ubi_scan_volume *sv)
void ubi_scan_destroy_si(struct ubi_scan_info *si)
{
struct ubi_ainf_peb *seb, *seb_tmp;
struct ubi_scan_volume *sv;
struct ubi_ainf_volume *sv;
struct rb_node *rb;

list_for_each_entry_safe(seb, seb_tmp, &si->alien, u.list) {
Expand Down Expand Up @@ -1305,7 +1305,7 @@ void ubi_scan_destroy_si(struct ubi_scan_info *si)
else if (rb->rb_right)
rb = rb->rb_right;
else {
sv = rb_entry(rb, struct ubi_scan_volume, rb);
sv = rb_entry(rb, struct ubi_ainf_volume, rb);

rb = rb_parent(rb);
if (rb) {
Expand Down Expand Up @@ -1337,7 +1337,7 @@ static int self_check_si(struct ubi_device *ubi, struct ubi_scan_info *si)
{
int pnum, err, vols_found = 0;
struct rb_node *rb1, *rb2;
struct ubi_scan_volume *sv;
struct ubi_ainf_volume *sv;
struct ubi_ainf_peb *seb, *last_seb;
uint8_t *buf;

Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/mtd/ubi/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct ubi_ainf_peb {
};

/**
* struct ubi_scan_volume - scanning information about a volume.
* struct ubi_ainf_volume - scanning information about a volume.
* @vol_id: volume ID
* @highest_lnum: highest logical eraseblock number in this volume
* @leb_count: number of logical eraseblocks in this volume
Expand All @@ -72,7 +72,7 @@ struct ubi_ainf_peb {
*
* One object of this type is allocated for each volume during scanning.
*/
struct ubi_scan_volume {
struct ubi_ainf_volume {
int vol_id;
int highest_lnum;
int leb_count;
Expand Down Expand Up @@ -148,7 +148,7 @@ struct ubi_vid_hdr;
* @seb: scanning eraseblock information
* @list: the list to move to
*/
static inline void ubi_scan_move_to_list(struct ubi_scan_volume *sv,
static inline void ubi_scan_move_to_list(struct ubi_ainf_volume *sv,
struct ubi_ainf_peb *seb,
struct list_head *list)
{
Expand All @@ -159,11 +159,11 @@ static inline void ubi_scan_move_to_list(struct ubi_scan_volume *sv,
int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si,
int pnum, int ec, const struct ubi_vid_hdr *vid_hdr,
int bitflips);
struct ubi_scan_volume *ubi_scan_find_sv(const struct ubi_scan_info *si,
struct ubi_ainf_volume *ubi_scan_find_sv(const struct ubi_scan_info *si,
int vol_id);
struct ubi_ainf_peb *ubi_scan_find_seb(const struct ubi_scan_volume *sv,
struct ubi_ainf_peb *ubi_scan_find_seb(const struct ubi_ainf_volume *sv,
int lnum);
void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_scan_volume *sv);
void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_ainf_volume *sv);
struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi,
struct ubi_scan_info *si);
int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_scan_info *si,
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/mtd/ubi/vtbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_scan_info *si,
*/
static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi,
struct ubi_scan_info *si,
struct ubi_scan_volume *sv)
struct ubi_ainf_volume *sv)
{
int err;
struct rb_node *rb;
Expand Down Expand Up @@ -535,7 +535,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,
const struct ubi_vtbl_record *vtbl)
{
int i, reserved_pebs = 0;
struct ubi_scan_volume *sv;
struct ubi_ainf_volume *sv;
struct ubi_volume *vol;

for (i = 0; i < ubi->vtbl_slots; i++) {
Expand Down Expand Up @@ -668,7 +668,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,
* to the data read from the volume tabla, and %-EINVAL if not.
*/
static int check_sv(const struct ubi_volume *vol,
const struct ubi_scan_volume *sv)
const struct ubi_ainf_volume *sv)
{
int err;

Expand Down Expand Up @@ -715,7 +715,7 @@ static int check_scanning_info(const struct ubi_device *ubi,
struct ubi_scan_info *si)
{
int err, i;
struct ubi_scan_volume *sv;
struct ubi_ainf_volume *sv;
struct ubi_volume *vol;

if (si->vols_found > UBI_INT_VOL_COUNT + ubi->vtbl_slots) {
Expand Down Expand Up @@ -779,7 +779,7 @@ static int check_scanning_info(const struct ubi_device *ubi,
int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_scan_info *si)
{
int i, err;
struct ubi_scan_volume *sv;
struct ubi_ainf_volume *sv;

empty_vtbl_record.crc = cpu_to_be32(0xf116c36b);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/ubi/wl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ int ubi_wl_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si)
{
int err, i;
struct rb_node *rb1, *rb2;
struct ubi_scan_volume *sv;
struct ubi_ainf_volume *sv;
struct ubi_ainf_peb *seb, *tmp;
struct ubi_wl_entry *e;

Expand Down

0 comments on commit 775ee59

Please sign in to comment.