Skip to content

Commit

Permalink
[JFFS2] Debug code clean up - step 2
Browse files Browse the repository at this point in the history
If debugging is disabled, define debugging functions as empty macros, instead
of using Dx() explicitly.

Signed-off-by: Artem B. Bityutskiy <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
dedekind authored and Thomas Gleixner committed Nov 6, 2005
1 parent 2b79adc commit 61a39b6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions fs/jffs2/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
* $Id: build.c,v 1.72 2005/07/17 06:56:20 dedekind Exp $
* $Id: build.c,v 1.74 2005/07/17 12:01:42 dedekind Exp $
*
*/

Expand Down Expand Up @@ -168,7 +168,7 @@ static int jffs2_build_filesystem(struct jffs2_sb_info *c)
c->flags &= ~JFFS2_SB_FLAG_BUILDING;

D1(printk(KERN_DEBUG "Pass 3 complete\n"));
D2(jffs2_dbg_dump_block_lists(c));
jffs2_dbg_dump_block_lists(c);

/* Rotate the lists by some number to ensure wear levelling */
jffs2_rotate_lists(c);
Expand Down
4 changes: 2 additions & 2 deletions fs/jffs2/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
* $Id: fs.c,v 1.57 2005/07/17 06:56:21 dedekind Exp $
* $Id: fs.c,v 1.58 2005/07/17 12:01:42 dedekind Exp $
*
*/

Expand Down Expand Up @@ -203,7 +203,7 @@ int jffs2_statfs(struct super_block *sb, struct kstatfs *buf)

buf->f_bavail = buf->f_bfree = avail >> PAGE_SHIFT;

D2(jffs2_dbg_dump_block_lists(c));
jffs2_dbg_dump_block_lists(c);

spin_unlock(&c->erase_completion_lock);

Expand Down
6 changes: 3 additions & 3 deletions fs/jffs2/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
* $Id: gc.c,v 1.149 2005/07/17 06:56:21 dedekind Exp $
* $Id: gc.c,v 1.150 2005/07/17 12:01:43 dedekind Exp $
*
*/

Expand Down Expand Up @@ -111,7 +111,7 @@ static struct jffs2_eraseblock *jffs2_find_gc_block(struct jffs2_sb_info *c)
ret->wasted_size = 0;
}

D2(jffs2_dbg_dump_block_lists(c));
jffs2_dbg_dump_block_lists(c);
return ret;
}

Expand Down Expand Up @@ -142,7 +142,7 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c)
if (c->checked_ino > c->highest_ino) {
printk(KERN_CRIT "Checked all inodes but still 0x%x bytes of unchecked space?\n",
c->unchecked_size);
D2(jffs2_dbg_dump_block_lists(c));
jffs2_dbg_dump_block_lists(c);
spin_unlock(&c->erase_completion_lock);
BUG();
}
Expand Down
6 changes: 3 additions & 3 deletions fs/jffs2/readinode.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
* $Id: readinode.c,v 1.127 2005/07/17 11:13:46 dedekind Exp $
* $Id: readinode.c,v 1.128 2005/07/17 12:01:43 dedekind Exp $
*
*/

Expand Down Expand Up @@ -92,8 +92,8 @@ int jffs2_add_full_dnode_to_inode(struct jffs2_sb_info *c, struct jffs2_inode_in
mark_ref_normal(next->node->raw);
}
}
D2(jffs2_dbg_fragtree_paranoia_check(f));
D2(jffs2_dbg_dump_fragtree(f));
jffs2_dbg_fragtree_paranoia_check(f);
jffs2_dbg_dump_fragtree(f);
return 0;
}

Expand Down
6 changes: 3 additions & 3 deletions fs/jffs2/wbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
* $Id: wbuf.c,v 1.93 2005/07/17 06:56:21 dedekind Exp $
* $Id: wbuf.c,v 1.94 2005/07/17 12:01:43 dedekind Exp $
*
*/

Expand Down Expand Up @@ -139,7 +139,7 @@ static void jffs2_block_refile(struct jffs2_sb_info *c, struct jffs2_eraseblock
{
D1(printk("About to refile bad block at %08x\n", jeb->offset));

D2(jffs2_dbg_dump_block_lists(c));
jffs2_dbg_dump_block_lists(c);
/* File the existing block on the bad_used_list.... */
if (c->nextblock == jeb)
c->nextblock = NULL;
Expand All @@ -156,7 +156,7 @@ static void jffs2_block_refile(struct jffs2_sb_info *c, struct jffs2_eraseblock
c->nr_erasing_blocks++;
jffs2_erase_pending_trigger(c);
}
D2(jffs2_dbg_dump_block_lists(c));
jffs2_dbg_dump_block_lists(c);

/* Adjust its size counts accordingly */
c->wasted_size += jeb->free_size;
Expand Down

0 comments on commit 61a39b6

Please sign in to comment.