[JFFS2] Debug code clean up - step 1
Move debug functions into a seperate source file
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index 316133c..85ae51d 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -9,7 +9,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: wbuf.c,v 1.92 2005/04/05 12:51:54 dedekind Exp $
+ * $Id: wbuf.c,v 1.93 2005/07/17 06:56:21 dedekind Exp $
*
*/
@@ -139,7 +139,7 @@
{
D1(printk("About to refile bad block at %08x\n", jeb->offset));
- D2(jffs2_dump_block_lists(c));
+ D2(jffs2_dbg_dump_block_lists(c));
/* File the existing block on the bad_used_list.... */
if (c->nextblock == jeb)
c->nextblock = NULL;
@@ -156,7 +156,7 @@
c->nr_erasing_blocks++;
jffs2_erase_pending_trigger(c);
}
- D2(jffs2_dump_block_lists(c));
+ D2(jffs2_dbg_dump_block_lists(c));
/* Adjust its size counts accordingly */
c->wasted_size += jeb->free_size;
@@ -164,8 +164,8 @@
jeb->wasted_size += jeb->free_size;
jeb->free_size = 0;
- ACCT_SANITY_CHECK(c,jeb);
- D1(ACCT_PARANOIA_CHECK(jeb));
+ jffs2_dbg_acct_sanity_check(c,jeb);
+ jffs2_dbg_acct_paranoia_check(c, jeb);
}
/* Recover from failure to write wbuf. Recover the nodes up to the
@@ -392,11 +392,11 @@
else
jeb->last_node = container_of(first_raw, struct jffs2_raw_node_ref, next_phys);
- ACCT_SANITY_CHECK(c,jeb);
- D1(ACCT_PARANOIA_CHECK(jeb));
+ jffs2_dbg_acct_sanity_check(c,jeb);
+ jffs2_dbg_acct_paranoia_check(c, jeb);
- ACCT_SANITY_CHECK(c,new_jeb);
- D1(ACCT_PARANOIA_CHECK(new_jeb));
+ jffs2_dbg_acct_sanity_check(c,new_jeb);
+ jffs2_dbg_acct_paranoia_check(c, new_jeb);
spin_unlock(&c->erase_completion_lock);
@@ -973,7 +973,7 @@
if (buf[i] != 0xFF) {
D2(printk(KERN_DEBUG "Found %02x at %x in OOB for %08x\n",
- buf[page+i], page+i, jeb->offset));
+ buf[i], i, jeb->offset));
ret = 1;
goto out;
}