aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/compr.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-15 18:56:45 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-26 19:40:19 -0400
commit5a528957e7c74f1fed73fe20424b7a3421658877 (patch)
tree4b5e353fe0ceb0e275f278461a62a8d3094fe692 /fs/jffs2/compr.c
parentda320f055a8818269c008e30b887cdcf09d8e4bd (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>
Diffstat (limited to 'fs/jffs2/compr.c')
-rw-r--r--fs/jffs2/compr.c21
1 files changed, 11 insertions, 10 deletions
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
17static DEFINE_SPINLOCK(jffs2_compressor_list_lock); 19static 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