aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/compr.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-15 18:56:44 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-26 19:39:40 -0400
commitda320f055a8818269c008e30b887cdcf09d8e4bd (patch)
treedeaead9c0bd0ed473e633fca2d66460b3b0ec99d /fs/jffs2/compr.c
parent9c261b33a9c417ccaf07f41796be278d09d02d49 (diff)
jffs2: Convert printks to pr_<level>
Use the more current logging style. Coalesce formats, align arguments. Convert uses of embedded function names to %s, __func__. A couple of long line checkpatch errors I don't care about exist. 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.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/jffs2/compr.c b/fs/jffs2/compr.c
index be8e493d76bd..ee9bf23ee8ef 100644
--- a/fs/jffs2/compr.c
+++ b/fs/jffs2/compr.c
@@ -79,7 +79,7 @@ static int jffs2_selected_compress(u8 compr, unsigned char *data_in,
79 79
80 output_buf = kmalloc(*cdatalen, GFP_KERNEL); 80 output_buf = kmalloc(*cdatalen, GFP_KERNEL);
81 if (!output_buf) { 81 if (!output_buf) {
82 printk(KERN_WARNING "JFFS2: No memory for compressor allocation. Compression failed.\n"); 82 pr_warn("JFFS2: No memory for compressor allocation. Compression failed.\n");
83 return ret; 83 return ret;
84 } 84 }
85 orig_slen = *datalen; 85 orig_slen = *datalen;
@@ -188,7 +188,8 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
188 tmp_buf = kmalloc(orig_slen, GFP_KERNEL); 188 tmp_buf = kmalloc(orig_slen, GFP_KERNEL);
189 spin_lock(&jffs2_compressor_list_lock); 189 spin_lock(&jffs2_compressor_list_lock);
190 if (!tmp_buf) { 190 if (!tmp_buf) {
191 printk(KERN_WARNING "JFFS2: No memory for compressor allocation. (%d bytes)\n", orig_slen); 191 pr_warn("JFFS2: No memory for compressor allocation. (%d bytes)\n",
192 orig_slen);
192 continue; 193 continue;
193 } 194 }
194 else { 195 else {
@@ -235,7 +236,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
235 cpage_out, datalen, cdatalen); 236 cpage_out, datalen, cdatalen);
236 break; 237 break;
237 default: 238 default:
238 printk(KERN_ERR "JFFS2: unknown compression mode.\n"); 239 pr_err("JFFS2: unknown compression mode\n");
239 } 240 }
240 241
241 if (ret == JFFS2_COMPR_NONE) { 242 if (ret == JFFS2_COMPR_NONE) {
@@ -277,7 +278,8 @@ int jffs2_decompress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
277 ret = this->decompress(cdata_in, data_out, cdatalen, datalen); 278 ret = this->decompress(cdata_in, data_out, cdatalen, datalen);
278 spin_lock(&jffs2_compressor_list_lock); 279 spin_lock(&jffs2_compressor_list_lock);
279 if (ret) { 280 if (ret) {
280 printk(KERN_WARNING "Decompressor \"%s\" returned %d\n", this->name, ret); 281 pr_warn("Decompressor \"%s\" returned %d\n",
282 this->name, ret);
281 } 283 }
282 else { 284 else {
283 this->stat_decompr_blocks++; 285 this->stat_decompr_blocks++;
@@ -287,7 +289,8 @@ int jffs2_decompress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
287 return ret; 289 return ret;
288 } 290 }
289 } 291 }
290 printk(KERN_WARNING "JFFS2 compression type 0x%02x not available.\n", comprtype); 292 pr_warn("JFFS2 compression type 0x%02x not available\n",
293 comprtype);
291 spin_unlock(&jffs2_compressor_list_lock); 294 spin_unlock(&jffs2_compressor_list_lock);
292 return -EIO; 295 return -EIO;
293 } 296 }
@@ -299,7 +302,7 @@ int jffs2_register_compressor(struct jffs2_compressor *comp)
299 struct jffs2_compressor *this; 302 struct jffs2_compressor *this;
300 303
301 if (!comp->name) { 304 if (!comp->name) {
302 printk(KERN_WARNING "NULL compressor name at registering JFFS2 compressor. Failed.\n"); 305 pr_warn("NULL compressor name at registering JFFS2 compressor. Failed.\n");
303 return -1; 306 return -1;
304 } 307 }
305 comp->compr_buf_size=0; 308 comp->compr_buf_size=0;
@@ -340,7 +343,7 @@ int jffs2_unregister_compressor(struct jffs2_compressor *comp)
340 343
341 if (comp->usecount) { 344 if (comp->usecount) {
342 spin_unlock(&jffs2_compressor_list_lock); 345 spin_unlock(&jffs2_compressor_list_lock);
343 printk(KERN_WARNING "JFFS2: Compressor module is in use. Unregister failed.\n"); 346 pr_warn("JFFS2: Compressor module is in use. Unregister failed.\n");
344 return -1; 347 return -1;
345 } 348 }
346 list_del(&comp->list); 349 list_del(&comp->list);