diff options
Diffstat (limited to 'fs/jffs2/debug.c')
-rw-r--r-- | fs/jffs2/debug.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/fs/jffs2/debug.c b/fs/jffs2/debug.c index e0b76c87a91..1090eb64b90 100644 --- a/fs/jffs2/debug.c +++ b/fs/jffs2/debug.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
14 | |||
13 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
14 | #include <linux/types.h> | 16 | #include <linux/types.h> |
15 | #include <linux/pagemap.h> | 17 | #include <linux/pagemap.h> |
@@ -261,12 +263,15 @@ void __jffs2_dbg_superblock_counts(struct jffs2_sb_info *c) | |||
261 | bad += c->sector_size; | 263 | bad += c->sector_size; |
262 | } | 264 | } |
263 | 265 | ||
264 | #define check(sz) \ | 266 | #define check(sz) \ |
265 | if (sz != c->sz##_size) { \ | 267 | do { \ |
266 | printk(KERN_WARNING #sz "_size mismatch counted 0x%x, c->" #sz "_size 0x%x\n", \ | 268 | if (sz != c->sz##_size) { \ |
267 | sz, c->sz##_size); \ | 269 | pr_warn("%s_size mismatch counted 0x%x, c->%s_size 0x%x\n", \ |
268 | dump = 1; \ | 270 | #sz, sz, #sz, c->sz##_size); \ |
269 | } | 271 | dump = 1; \ |
272 | } \ | ||
273 | } while (0) | ||
274 | |||
270 | check(free); | 275 | check(free); |
271 | check(dirty); | 276 | check(dirty); |
272 | check(used); | 277 | check(used); |
@@ -274,11 +279,12 @@ void __jffs2_dbg_superblock_counts(struct jffs2_sb_info *c) | |||
274 | check(unchecked); | 279 | check(unchecked); |
275 | check(bad); | 280 | check(bad); |
276 | check(erasing); | 281 | check(erasing); |
282 | |||
277 | #undef check | 283 | #undef check |
278 | 284 | ||
279 | if (nr_counted != c->nr_blocks) { | 285 | if (nr_counted != c->nr_blocks) { |
280 | printk(KERN_WARNING "%s counted only 0x%x blocks of 0x%x. Where are the others?\n", | 286 | pr_warn("%s counted only 0x%x blocks of 0x%x. Where are the others?\n", |
281 | __func__, nr_counted, c->nr_blocks); | 287 | __func__, nr_counted, c->nr_blocks); |
282 | dump = 1; | 288 | dump = 1; |
283 | } | 289 | } |
284 | 290 | ||