return !(yaffs_trace_mask & (YAFFS_TRACE_VERIFY_NAND));
}
-static const char *block_state_name[] = {
+static const char * const block_state_name[] = {
"Unknown",
"Needs scanning",
"Scanning",
yaffs_trace(YAFFS_TRACE_VERIFY,
"Block %d has inconsistent values pages_in_use %d counted chunk bits %d",
n, bi->pages_in_use, in_use);
-
}
void yaffs_verify_collected_blk(struct yaffs_dev *dev,
"Obj %d header name is NULL",
obj->obj_id);
- if (tags->obj_id > 1 && ((u8) (oh->name[0])) == 0xff) /* Trashed name */
+ if (tags->obj_id > 1 && ((u8) (oh->name[0])) == 0xff) /* Junk name */
yaffs_trace(YAFFS_TRACE_VERIFY,
"Obj %d header name is 0xFF",
obj->obj_id);
yaffs_rd_chunk_tags_nand(dev, the_chunk, NULL,
&tags);
if (tags.obj_id != obj_id || tags.chunk_id != i)
- yaffs_trace(YAFFS_TRACE_VERIFY,
- "Object %d chunk_id %d NAND mismatch chunk %d tags (%d:%d)",
- obj_id, i, the_chunk,
- tags.obj_id, tags.chunk_id);
+ yaffs_trace(YAFFS_TRACE_VERIFY,
+ "Object %d chunk_id %d NAND mismatch chunk %d tags (%d:%d)",
+ obj_id, i, the_chunk,
+ tags.obj_id, tags.chunk_id);
}
}
}
void yaffs_verify_obj(struct yaffs_obj *obj)
{
struct yaffs_dev *dev;
-
u32 chunk_min;
u32 chunk_max;
-
u32 chunk_id_ok;
u32 chunk_in_range;
u32 chunk_wrongly_deleted;
for (i = 0; i < YAFFS_NOBJECT_BUCKETS; i++) {
list_for_each(lh, &dev->obj_bucket[i].list) {
- obj = list_entry(lh, struct yaffs_obj, hash_link);
+ obj = list_entry(lh, struct yaffs_obj, hash_link);
yaffs_verify_obj(obj);
}
}
{
struct list_head *lh;
struct yaffs_obj *list_obj;
-
int count = 0;
if (!obj) {
yaffs_trace(YAFFS_TRACE_ALWAYS, "No object to verify");
- YBUG();
+ BUG();
return;
}
return;
if (!obj->parent) {
- yaffs_trace(YAFFS_TRACE_ALWAYS, "Object does not have parent" );
- YBUG();
+ yaffs_trace(YAFFS_TRACE_ALWAYS, "Object does not have parent");
+ BUG();
return;
}
if (obj->parent->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
yaffs_trace(YAFFS_TRACE_ALWAYS, "Parent is not directory");
- YBUG();
+ BUG();
}
/* Iterate through the objects in each hash entry */
yaffs_trace(YAFFS_TRACE_ALWAYS,
"Object in directory %d times",
count);
- YBUG();
+ BUG();
}
}
struct yaffs_obj *list_obj;
if (!directory) {
- YBUG();
+ BUG();
return;
}
yaffs_trace(YAFFS_TRACE_ALWAYS,
"Directory has wrong type: %d",
directory->variant_type);
- YBUG();
+ BUG();
}
/* Iterate through the objects in each hash entry */
yaffs_trace(YAFFS_TRACE_ALWAYS,
"Object in directory list has wrong parent %p",
list_obj->parent);
- YBUG();
+ BUG();
}
yaffs_verify_obj_in_dir(list_obj);
}
if (difference) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
- "Freechunks verification failure %d %d %d",
+ "Freechunks verification failure %d %d %d",
dev->n_free_chunks, counted, difference);
yaffs_free_verification_failures++;
}