diff options
author | Joe Perches <joe@perches.com> | 2012-02-15 18:56:45 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-03-26 19:40:19 -0400 |
commit | 5a528957e7c74f1fed73fe20424b7a3421658877 (patch) | |
tree | 4b5e353fe0ceb0e275f278461a62a8d3094fe692 | |
parent | da320f055a8818269c008e30b887cdcf09d8e4bd (diff) |
jffs2: Use pr_fmt and remove jffs: from formats
Use pr_fmt to prefix KBUILD_MODNAME to appropriate logging messages.
Remove now unnecessary internal prefixes from formats.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r-- | fs/jffs2/acl.c | 2 | ||||
-rw-r--r-- | fs/jffs2/background.c | 7 | ||||
-rw-r--r-- | fs/jffs2/build.c | 6 | ||||
-rw-r--r-- | fs/jffs2/compr.c | 21 | ||||
-rw-r--r-- | fs/jffs2/compr_rubin.c | 2 | ||||
-rw-r--r-- | fs/jffs2/compr_zlib.c | 2 | ||||
-rw-r--r-- | fs/jffs2/debug.c | 2 | ||||
-rw-r--r-- | fs/jffs2/dir.c | 2 | ||||
-rw-r--r-- | fs/jffs2/erase.c | 2 | ||||
-rw-r--r-- | fs/jffs2/file.c | 2 | ||||
-rw-r--r-- | fs/jffs2/fs.c | 10 | ||||
-rw-r--r-- | fs/jffs2/gc.c | 6 | ||||
-rw-r--r-- | fs/jffs2/malloc.c | 2 | ||||
-rw-r--r-- | fs/jffs2/nodelist.c | 2 | ||||
-rw-r--r-- | fs/jffs2/nodemgmt.c | 2 | ||||
-rw-r--r-- | fs/jffs2/read.c | 2 | ||||
-rw-r--r-- | fs/jffs2/readinode.c | 2 | ||||
-rw-r--r-- | fs/jffs2/scan.c | 7 | ||||
-rw-r--r-- | fs/jffs2/summary.c | 5 | ||||
-rw-r--r-- | fs/jffs2/super.c | 16 | ||||
-rw-r--r-- | fs/jffs2/symlink.c | 2 | ||||
-rw-r--r-- | fs/jffs2/wbuf.c | 12 | ||||
-rw-r--r-- | fs/jffs2/write.c | 2 |
23 files changed, 80 insertions, 38 deletions
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index 926d02068a14..922f146e4235 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
14 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c index 63dafc6196e5..2b60ce1996aa 100644 --- a/fs/jffs2/background.c +++ b/fs/jffs2/background.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/jffs2.h> | 16 | #include <linux/jffs2.h> |
15 | #include <linux/mtd/mtd.h> | 17 | #include <linux/mtd/mtd.h> |
@@ -48,8 +50,7 @@ int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c) | |||
48 | ret = PTR_ERR(tsk); | 50 | ret = PTR_ERR(tsk); |
49 | } else { | 51 | } else { |
50 | /* Wait for it... */ | 52 | /* Wait for it... */ |
51 | jffs2_dbg(1, "JFFS2: Garbage collect thread is pid %d\n", | 53 | jffs2_dbg(1, "Garbage collect thread is pid %d\n", tsk->pid); |
52 | tsk->pid); | ||
53 | wait_for_completion(&c->gc_thread_start); | 54 | wait_for_completion(&c->gc_thread_start); |
54 | ret = tsk->pid; | 55 | ret = tsk->pid; |
55 | } | 56 | } |
@@ -62,7 +63,7 @@ void jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c) | |||
62 | int wait = 0; | 63 | int wait = 0; |
63 | spin_lock(&c->erase_completion_lock); | 64 | spin_lock(&c->erase_completion_lock); |
64 | if (c->gc_task) { | 65 | if (c->gc_task) { |
65 | jffs2_dbg(1, "jffs2: Killing GC task %d\n", c->gc_task->pid); | 66 | jffs2_dbg(1, "Killing GC task %d\n", c->gc_task->pid); |
66 | send_sig(SIGKILL, c->gc_task, 1); | 67 | send_sig(SIGKILL, c->gc_task, 1); |
67 | wait = 1; | 68 | wait = 1; |
68 | } | 69 | } |
diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c index 3005ec4520ad..a3750f902adc 100644 --- a/fs/jffs2/build.c +++ b/fs/jffs2/build.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/sched.h> | 16 | #include <linux/sched.h> |
15 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
@@ -307,8 +309,8 @@ static void jffs2_calc_trigger_levels(struct jffs2_sb_info *c) | |||
307 | trying to GC to make more space. It'll be a fruitless task */ | 309 | trying to GC to make more space. It'll be a fruitless task */ |
308 | c->nospc_dirty_size = c->sector_size + (c->flash_size / 100); | 310 | c->nospc_dirty_size = c->sector_size + (c->flash_size / 100); |
309 | 311 | ||
310 | dbg_fsbuild("JFFS2 trigger levels (size %d KiB, block size %d KiB, %d blocks)\n", | 312 | dbg_fsbuild("trigger levels (size %d KiB, block size %d KiB, %d blocks)\n", |
311 | c->flash_size / 1024, c->sector_size / 1024, c->nr_blocks); | 313 | c->flash_size / 1024, c->sector_size / 1024, c->nr_blocks); |
312 | dbg_fsbuild("Blocks required to allow deletion: %d (%d KiB)\n", | 314 | dbg_fsbuild("Blocks required to allow deletion: %d (%d KiB)\n", |
313 | c->resv_blocks_deletion, c->resv_blocks_deletion*c->sector_size/1024); | 315 | c->resv_blocks_deletion, c->resv_blocks_deletion*c->sector_size/1024); |
314 | dbg_fsbuild("Blocks required to allow writes: %d (%d KiB)\n", | 316 | dbg_fsbuild("Blocks required to allow writes: %d (%d KiB)\n", |
diff --git a/fs/jffs2/compr.c b/fs/jffs2/compr.c index ee9bf23ee8ef..4849a4c9a0e2 100644 --- a/fs/jffs2/compr.c +++ b/fs/jffs2/compr.c | |||
@@ -12,6 +12,8 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
16 | |||
15 | #include "compr.h" | 17 | #include "compr.h" |
16 | 18 | ||
17 | static DEFINE_SPINLOCK(jffs2_compressor_list_lock); | 19 | static DEFINE_SPINLOCK(jffs2_compressor_list_lock); |
@@ -79,7 +81,7 @@ static int jffs2_selected_compress(u8 compr, unsigned char *data_in, | |||
79 | 81 | ||
80 | output_buf = kmalloc(*cdatalen, GFP_KERNEL); | 82 | output_buf = kmalloc(*cdatalen, GFP_KERNEL); |
81 | if (!output_buf) { | 83 | if (!output_buf) { |
82 | pr_warn("JFFS2: No memory for compressor allocation. Compression failed.\n"); | 84 | pr_warn("No memory for compressor allocation. Compression failed.\n"); |
83 | return ret; | 85 | return ret; |
84 | } | 86 | } |
85 | orig_slen = *datalen; | 87 | orig_slen = *datalen; |
@@ -188,7 +190,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, | |||
188 | tmp_buf = kmalloc(orig_slen, GFP_KERNEL); | 190 | tmp_buf = kmalloc(orig_slen, GFP_KERNEL); |
189 | spin_lock(&jffs2_compressor_list_lock); | 191 | spin_lock(&jffs2_compressor_list_lock); |
190 | if (!tmp_buf) { | 192 | if (!tmp_buf) { |
191 | pr_warn("JFFS2: No memory for compressor allocation. (%d bytes)\n", | 193 | pr_warn("No memory for compressor allocation. (%d bytes)\n", |
192 | orig_slen); | 194 | orig_slen); |
193 | continue; | 195 | continue; |
194 | } | 196 | } |
@@ -236,7 +238,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, | |||
236 | cpage_out, datalen, cdatalen); | 238 | cpage_out, datalen, cdatalen); |
237 | break; | 239 | break; |
238 | default: | 240 | default: |
239 | pr_err("JFFS2: unknown compression mode\n"); | 241 | pr_err("unknown compression mode\n"); |
240 | } | 242 | } |
241 | 243 | ||
242 | if (ret == JFFS2_COMPR_NONE) { | 244 | if (ret == JFFS2_COMPR_NONE) { |
@@ -289,8 +291,7 @@ int jffs2_decompress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, | |||
289 | return ret; | 291 | return ret; |
290 | } | 292 | } |
291 | } | 293 | } |
292 | pr_warn("JFFS2 compression type 0x%02x not available\n", | 294 | pr_warn("compression type 0x%02x not available\n", comprtype); |
293 | comprtype); | ||
294 | spin_unlock(&jffs2_compressor_list_lock); | 295 | spin_unlock(&jffs2_compressor_list_lock); |
295 | return -EIO; | 296 | return -EIO; |
296 | } | 297 | } |
@@ -343,7 +344,7 @@ int jffs2_unregister_compressor(struct jffs2_compressor *comp) | |||
343 | 344 | ||
344 | if (comp->usecount) { | 345 | if (comp->usecount) { |
345 | spin_unlock(&jffs2_compressor_list_lock); | 346 | spin_unlock(&jffs2_compressor_list_lock); |
346 | pr_warn("JFFS2: Compressor module is in use. Unregister failed.\n"); | 347 | pr_warn("Compressor module is in use. Unregister failed.\n"); |
347 | return -1; | 348 | return -1; |
348 | } | 349 | } |
349 | list_del(&comp->list); | 350 | list_del(&comp->list); |
@@ -380,17 +381,17 @@ int __init jffs2_compressors_init(void) | |||
380 | /* Setting default compression mode */ | 381 | /* Setting default compression mode */ |
381 | #ifdef CONFIG_JFFS2_CMODE_NONE | 382 | #ifdef CONFIG_JFFS2_CMODE_NONE |
382 | jffs2_compression_mode = JFFS2_COMPR_MODE_NONE; | 383 | jffs2_compression_mode = JFFS2_COMPR_MODE_NONE; |
383 | jffs2_dbg(1, "JFFS2: default compression mode: none\n"); | 384 | jffs2_dbg(1, "default compression mode: none\n"); |
384 | #else | 385 | #else |
385 | #ifdef CONFIG_JFFS2_CMODE_SIZE | 386 | #ifdef CONFIG_JFFS2_CMODE_SIZE |
386 | jffs2_compression_mode = JFFS2_COMPR_MODE_SIZE; | 387 | jffs2_compression_mode = JFFS2_COMPR_MODE_SIZE; |
387 | jffs2_dbg(1, "JFFS2: default compression mode: size\n"); | 388 | jffs2_dbg(1, "default compression mode: size\n"); |
388 | #else | 389 | #else |
389 | #ifdef CONFIG_JFFS2_CMODE_FAVOURLZO | 390 | #ifdef CONFIG_JFFS2_CMODE_FAVOURLZO |
390 | jffs2_compression_mode = JFFS2_COMPR_MODE_FAVOURLZO; | 391 | jffs2_compression_mode = JFFS2_COMPR_MODE_FAVOURLZO; |
391 | jffs2_dbg(1, "JFFS2: default compression mode: favourlzo\n"); | 392 | jffs2_dbg(1, "default compression mode: favourlzo\n"); |
392 | #else | 393 | #else |
393 | jffs2_dbg(1, "JFFS2: default compression mode: priority\n"); | 394 | jffs2_dbg(1, "default compression mode: priority\n"); |
394 | #endif | 395 | #endif |
395 | #endif | 396 | #endif |
396 | #endif | 397 | #endif |
diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c index 9e7cec808c4c..92e0644bf867 100644 --- a/fs/jffs2/compr_rubin.c +++ b/fs/jffs2/compr_rubin.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
14 | |||
13 | #include <linux/string.h> | 15 | #include <linux/string.h> |
14 | #include <linux/types.h> | 16 | #include <linux/types.h> |
15 | #include <linux/jffs2.h> | 17 | #include <linux/jffs2.h> |
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index 88529e4924c6..0b9a1e44e833 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #error "The userspace support got too messy and was removed. Update your mkfs.jffs2" | 14 | #error "The userspace support got too messy and was removed. Update your mkfs.jffs2" |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
18 | |||
17 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
18 | #include <linux/zlib.h> | 20 | #include <linux/zlib.h> |
19 | #include <linux/zutil.h> | 21 | #include <linux/zutil.h> |
diff --git a/fs/jffs2/debug.c b/fs/jffs2/debug.c index 6cac7d6aad69..f8a99a371508 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> |
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index a7a3c1ac9121..b56018896d5e 100644 --- a/fs/jffs2/dir.c +++ b/fs/jffs2/dir.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/slab.h> | 16 | #include <linux/slab.h> |
15 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c index 5f14309a1faf..e7594c604d28 100644 --- a/fs/jffs2/erase.c +++ b/fs/jffs2/erase.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/slab.h> | 16 | #include <linux/slab.h> |
15 | #include <linux/mtd/mtd.h> | 17 | #include <linux/mtd/mtd.h> |
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c index 5ffc3562ae23..db3889ba8818 100644 --- a/fs/jffs2/file.c +++ b/fs/jffs2/file.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/fs.h> | 16 | #include <linux/fs.h> |
15 | #include <linux/time.h> | 17 | #include <linux/time.h> |
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 598baafa0219..43052faa94e1 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
14 | |||
13 | #include <linux/capability.h> | 15 | #include <linux/capability.h> |
14 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
15 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
@@ -513,11 +515,11 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent) | |||
513 | 515 | ||
514 | #ifndef CONFIG_JFFS2_FS_WRITEBUFFER | 516 | #ifndef CONFIG_JFFS2_FS_WRITEBUFFER |
515 | if (c->mtd->type == MTD_NANDFLASH) { | 517 | if (c->mtd->type == MTD_NANDFLASH) { |
516 | pr_err("jffs2: Cannot operate on NAND flash unless jffs2 NAND support is compiled in.\n"); | 518 | pr_err("Cannot operate on NAND flash unless jffs2 NAND support is compiled in\n"); |
517 | return -EINVAL; | 519 | return -EINVAL; |
518 | } | 520 | } |
519 | if (c->mtd->type == MTD_DATAFLASH) { | 521 | if (c->mtd->type == MTD_DATAFLASH) { |
520 | pr_err("jffs2: Cannot operate on DataFlash unless jffs2 DataFlash support is compiled in.\n"); | 522 | pr_err("Cannot operate on DataFlash unless jffs2 DataFlash support is compiled in\n"); |
521 | return -EINVAL; | 523 | return -EINVAL; |
522 | } | 524 | } |
523 | #endif | 525 | #endif |
@@ -531,12 +533,12 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent) | |||
531 | */ | 533 | */ |
532 | if ((c->sector_size * blocks) != c->flash_size) { | 534 | if ((c->sector_size * blocks) != c->flash_size) { |
533 | c->flash_size = c->sector_size * blocks; | 535 | c->flash_size = c->sector_size * blocks; |
534 | pr_info("jffs2: Flash size not aligned to erasesize, reducing to %dKiB\n", | 536 | pr_info("Flash size not aligned to erasesize, reducing to %dKiB\n", |
535 | c->flash_size / 1024); | 537 | c->flash_size / 1024); |
536 | } | 538 | } |
537 | 539 | ||
538 | if (c->flash_size < 5*c->sector_size) { | 540 | if (c->flash_size < 5*c->sector_size) { |
539 | pr_err("jffs2: Too few erase blocks (%d)\n", | 541 | pr_err("Too few erase blocks (%d)\n", |
540 | c->flash_size / c->sector_size); | 542 | c->flash_size / c->sector_size); |
541 | return -EINVAL; | 543 | return -EINVAL; |
542 | } | 544 | } |
diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c index d7936d068b2e..ad271c70aa25 100644 --- a/fs/jffs2/gc.c +++ b/fs/jffs2/gc.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/mtd/mtd.h> | 16 | #include <linux/mtd/mtd.h> |
15 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
@@ -88,7 +90,7 @@ again: | |||
88 | goto again; | 90 | goto again; |
89 | } else { | 91 | } else { |
90 | /* Eep. All were empty */ | 92 | /* Eep. All were empty */ |
91 | jffs2_dbg(1, "jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they all?\n"); | 93 | jffs2_dbg(1, "No clean, dirty _or_ erasable blocks to GC from! Where are they all?\n"); |
92 | return NULL; | 94 | return NULL; |
93 | } | 95 | } |
94 | 96 | ||
@@ -249,7 +251,7 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) | |||
249 | mutex_unlock(&c->alloc_sem); | 251 | mutex_unlock(&c->alloc_sem); |
250 | return -EAGAIN; | 252 | return -EAGAIN; |
251 | } | 253 | } |
252 | jffs2_dbg(1, "jffs2: Couldn't find erase block to garbage collect!\n"); | 254 | jffs2_dbg(1, "Couldn't find erase block to garbage collect!\n"); |
253 | spin_unlock(&c->erase_completion_lock); | 255 | spin_unlock(&c->erase_completion_lock); |
254 | mutex_unlock(&c->alloc_sem); | 256 | mutex_unlock(&c->alloc_sem); |
255 | return -EIO; | 257 | return -EIO; |
diff --git a/fs/jffs2/malloc.c b/fs/jffs2/malloc.c index c082868910f2..4f47aa24b556 100644 --- a/fs/jffs2/malloc.c +++ b/fs/jffs2/malloc.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
14 | #include <linux/init.h> | 16 | #include <linux/init.h> |
diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c index fc16761d72e4..975a1f562c10 100644 --- a/fs/jffs2/nodelist.c +++ b/fs/jffs2/nodelist.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
14 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c index 563a5f645ba7..6784d1e7a7eb 100644 --- a/fs/jffs2/nodemgmt.c +++ b/fs/jffs2/nodemgmt.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
14 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
diff --git a/fs/jffs2/read.c b/fs/jffs2/read.c index 925ec6541504..0b042b1fc82f 100644 --- a/fs/jffs2/read.c +++ b/fs/jffs2/read.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
14 | #include <linux/crc32.h> | 16 | #include <linux/crc32.h> |
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index 3093ac4fb24c..dc0437e84763 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
14 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c index 078cede67141..7654e87b0428 100644 --- a/fs/jffs2/scan.c +++ b/fs/jffs2/scan.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
14 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
@@ -218,15 +220,14 @@ int jffs2_scan_medium(struct jffs2_sb_info *c) | |||
218 | case BLK_STATE_ALLDIRTY: | 220 | case BLK_STATE_ALLDIRTY: |
219 | /* Nothing valid - not even a clean marker. Needs erasing. */ | 221 | /* Nothing valid - not even a clean marker. Needs erasing. */ |
220 | /* For now we just put it on the erasing list. We'll start the erases later */ | 222 | /* For now we just put it on the erasing list. We'll start the erases later */ |
221 | jffs2_dbg(1, "JFFS2: Erase block at 0x%08x is not formatted. It will be erased\n", | 223 | jffs2_dbg(1, "Erase block at 0x%08x is not formatted. It will be erased\n", |
222 | jeb->offset); | 224 | jeb->offset); |
223 | list_add(&jeb->list, &c->erase_pending_list); | 225 | list_add(&jeb->list, &c->erase_pending_list); |
224 | c->nr_erasing_blocks++; | 226 | c->nr_erasing_blocks++; |
225 | break; | 227 | break; |
226 | 228 | ||
227 | case BLK_STATE_BADBLOCK: | 229 | case BLK_STATE_BADBLOCK: |
228 | jffs2_dbg(1, "JFFS2: Block at 0x%08x is bad\n", | 230 | jffs2_dbg(1, "Block at 0x%08x is bad\n", jeb->offset); |
229 | jeb->offset); | ||
230 | list_add(&jeb->list, &c->bad_list); | 231 | list_add(&jeb->list, &c->bad_list); |
231 | c->bad_size += c->sector_size; | 232 | c->bad_size += c->sector_size; |
232 | c->free_size -= c->sector_size; | 233 | c->free_size -= c->sector_size; |
diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c index 0789e4e3a061..c522d098bb4f 100644 --- a/fs/jffs2/summary.c +++ b/fs/jffs2/summary.c | |||
@@ -11,6 +11,8 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
15 | |||
14 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
16 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
@@ -811,8 +813,7 @@ static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock | |||
811 | 813 | ||
812 | sum_ofs = jeb->offset + c->sector_size - jeb->free_size; | 814 | sum_ofs = jeb->offset + c->sector_size - jeb->free_size; |
813 | 815 | ||
814 | dbg_summary("JFFS2: writing out data to flash to pos : 0x%08x\n", | 816 | dbg_summary("writing out data to flash to pos : 0x%08x\n", sum_ofs); |
815 | sum_ofs); | ||
816 | 817 | ||
817 | ret = jffs2_flash_writev(c, vecs, 2, sum_ofs, &retlen, 0); | 818 | ret = jffs2_flash_writev(c, vecs, 2, sum_ofs, &retlen, 0); |
818 | 819 | ||
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 9e3ba7f0a893..f9916f312bd8 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 15 | #include <linux/module.h> |
14 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
@@ -214,7 +216,7 @@ static int jffs2_parse_options(struct jffs2_sb_info *c, char *data) | |||
214 | JFFS2_COMPR_MODE_FORCEZLIB; | 216 | JFFS2_COMPR_MODE_FORCEZLIB; |
215 | #endif | 217 | #endif |
216 | else { | 218 | else { |
217 | pr_err("JFFS2 Error: unknown compressor \"%s\"", | 219 | pr_err("Error: unknown compressor \"%s\"\n", |
218 | name); | 220 | name); |
219 | kfree(name); | 221 | kfree(name); |
220 | return -EINVAL; | 222 | return -EINVAL; |
@@ -223,7 +225,7 @@ static int jffs2_parse_options(struct jffs2_sb_info *c, char *data) | |||
223 | c->mount_opts.override_compr = true; | 225 | c->mount_opts.override_compr = true; |
224 | break; | 226 | break; |
225 | default: | 227 | default: |
226 | pr_err("JFFS2 Error: unrecognized mount option '%s' or missing value\n", | 228 | pr_err("Error: unrecognized mount option '%s' or missing value\n", |
227 | p); | 229 | p); |
228 | return -EINVAL; | 230 | return -EINVAL; |
229 | } | 231 | } |
@@ -371,7 +373,7 @@ static int __init init_jffs2_fs(void) | |||
371 | BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68); | 373 | BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68); |
372 | BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32); | 374 | BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32); |
373 | 375 | ||
374 | pr_info("JFFS2 version 2.2." | 376 | pr_info("version 2.2." |
375 | #ifdef CONFIG_JFFS2_FS_WRITEBUFFER | 377 | #ifdef CONFIG_JFFS2_FS_WRITEBUFFER |
376 | " (NAND)" | 378 | " (NAND)" |
377 | #endif | 379 | #endif |
@@ -386,22 +388,22 @@ static int __init init_jffs2_fs(void) | |||
386 | SLAB_MEM_SPREAD), | 388 | SLAB_MEM_SPREAD), |
387 | jffs2_i_init_once); | 389 | jffs2_i_init_once); |
388 | if (!jffs2_inode_cachep) { | 390 | if (!jffs2_inode_cachep) { |
389 | pr_err("JFFS2 error: Failed to initialise inode cache\n"); | 391 | pr_err("error: Failed to initialise inode cache\n"); |
390 | return -ENOMEM; | 392 | return -ENOMEM; |
391 | } | 393 | } |
392 | ret = jffs2_compressors_init(); | 394 | ret = jffs2_compressors_init(); |
393 | if (ret) { | 395 | if (ret) { |
394 | pr_err("JFFS2 error: Failed to initialise compressors\n"); | 396 | pr_err("error: Failed to initialise compressors\n"); |
395 | goto out; | 397 | goto out; |
396 | } | 398 | } |
397 | ret = jffs2_create_slab_caches(); | 399 | ret = jffs2_create_slab_caches(); |
398 | if (ret) { | 400 | if (ret) { |
399 | pr_err("JFFS2 error: Failed to initialise slab caches\n"); | 401 | pr_err("error: Failed to initialise slab caches\n"); |
400 | goto out_compressors; | 402 | goto out_compressors; |
401 | } | 403 | } |
402 | ret = register_filesystem(&jffs2_fs_type); | 404 | ret = register_filesystem(&jffs2_fs_type); |
403 | if (ret) { | 405 | if (ret) { |
404 | pr_err("JFFS2 error: Failed to register filesystem\n"); | 406 | pr_err("error: Failed to register filesystem\n"); |
405 | goto out_slab; | 407 | goto out_slab; |
406 | } | 408 | } |
407 | return 0; | 409 | return 0; |
diff --git a/fs/jffs2/symlink.c b/fs/jffs2/symlink.c index 56eeed5269c8..6e563332bb24 100644 --- a/fs/jffs2/symlink.c +++ b/fs/jffs2/symlink.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
14 | #include <linux/namei.h> | 16 | #include <linux/namei.h> |
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 89a6ec0fa766..74d9be19df3f 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c | |||
@@ -11,6 +11,8 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
15 | |||
14 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
16 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
@@ -1135,7 +1137,7 @@ int jffs2_write_nand_badblock(struct jffs2_sb_info *c, struct jffs2_eraseblock * | |||
1135 | if( ++jeb->bad_count < MAX_ERASE_FAILURES) | 1137 | if( ++jeb->bad_count < MAX_ERASE_FAILURES) |
1136 | return 0; | 1138 | return 0; |
1137 | 1139 | ||
1138 | pr_warn("JFFS2: marking eraseblock at %08x as bad\n", bad_offset); | 1140 | pr_warn("marking eraseblock at %08x as bad\n", bad_offset); |
1139 | ret = mtd_block_markbad(c->mtd, bad_offset); | 1141 | ret = mtd_block_markbad(c->mtd, bad_offset); |
1140 | 1142 | ||
1141 | if (ret) { | 1143 | if (ret) { |
@@ -1161,7 +1163,7 @@ int jffs2_nand_flash_setup(struct jffs2_sb_info *c) | |||
1161 | return -EINVAL; | 1163 | return -EINVAL; |
1162 | } | 1164 | } |
1163 | 1165 | ||
1164 | jffs2_dbg(1, "JFFS2 using OOB on NAND\n"); | 1166 | jffs2_dbg(1, "using OOB on NAND\n"); |
1165 | 1167 | ||
1166 | c->oobavail = oinfo->oobavail; | 1168 | c->oobavail = oinfo->oobavail; |
1167 | 1169 | ||
@@ -1228,7 +1230,7 @@ int jffs2_dataflash_setup(struct jffs2_sb_info *c) { | |||
1228 | 1230 | ||
1229 | if ((c->flash_size % c->sector_size) != 0) { | 1231 | if ((c->flash_size % c->sector_size) != 0) { |
1230 | c->flash_size = (c->flash_size / c->sector_size) * c->sector_size; | 1232 | c->flash_size = (c->flash_size / c->sector_size) * c->sector_size; |
1231 | pr_warn("JFFS2 flash size adjusted to %dKiB\n", c->flash_size); | 1233 | pr_warn("flash size adjusted to %dKiB\n", c->flash_size); |
1232 | }; | 1234 | }; |
1233 | 1235 | ||
1234 | c->wbuf_ofs = 0xFFFFFFFF; | 1236 | c->wbuf_ofs = 0xFFFFFFFF; |
@@ -1245,7 +1247,7 @@ int jffs2_dataflash_setup(struct jffs2_sb_info *c) { | |||
1245 | } | 1247 | } |
1246 | #endif | 1248 | #endif |
1247 | 1249 | ||
1248 | pr_info("JFFS2 write-buffering enabled buffer (%d) erasesize (%d)\n", | 1250 | pr_info("write-buffering enabled buffer (%d) erasesize (%d)\n", |
1249 | c->wbuf_pagesize, c->sector_size); | 1251 | c->wbuf_pagesize, c->sector_size); |
1250 | 1252 | ||
1251 | return 0; | 1253 | return 0; |
@@ -1304,7 +1306,7 @@ int jffs2_ubivol_setup(struct jffs2_sb_info *c) { | |||
1304 | if (!c->wbuf) | 1306 | if (!c->wbuf) |
1305 | return -ENOMEM; | 1307 | return -ENOMEM; |
1306 | 1308 | ||
1307 | pr_info("JFFS2 write-buffering enabled buffer (%d) erasesize (%d)\n", | 1309 | pr_info("write-buffering enabled buffer (%d) erasesize (%d)\n", |
1308 | c->wbuf_pagesize, c->sector_size); | 1310 | c->wbuf_pagesize, c->sector_size); |
1309 | 1311 | ||
1310 | return 0; | 1312 | return 0; |
diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c index d98b22036738..b634de4c8101 100644 --- a/fs/jffs2/write.c +++ b/fs/jffs2/write.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
14 | #include <linux/crc32.h> | 16 | #include <linux/crc32.h> |