aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/fs.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/fs.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/fs.c')
-rw-r--r--fs/jffs2/fs.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index 9a8c97c264c2..598baafa0219 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -320,14 +320,16 @@ struct inode *jffs2_iget(struct super_block *sb, unsigned long ino)
320 /* Read the device numbers from the media */ 320 /* Read the device numbers from the media */
321 if (f->metadata->size != sizeof(jdev.old_id) && 321 if (f->metadata->size != sizeof(jdev.old_id) &&
322 f->metadata->size != sizeof(jdev.new_id)) { 322 f->metadata->size != sizeof(jdev.new_id)) {
323 printk(KERN_NOTICE "Device node has strange size %d\n", f->metadata->size); 323 pr_notice("Device node has strange size %d\n",
324 f->metadata->size);
324 goto error_io; 325 goto error_io;
325 } 326 }
326 jffs2_dbg(1, "Reading device numbers from flash\n"); 327 jffs2_dbg(1, "Reading device numbers from flash\n");
327 ret = jffs2_read_dnode(c, f, f->metadata, (char *)&jdev, 0, f->metadata->size); 328 ret = jffs2_read_dnode(c, f, f->metadata, (char *)&jdev, 0, f->metadata->size);
328 if (ret < 0) { 329 if (ret < 0) {
329 /* Eep */ 330 /* Eep */
330 printk(KERN_NOTICE "Read device numbers for inode %lu failed\n", (unsigned long)inode->i_ino); 331 pr_notice("Read device numbers for inode %lu failed\n",
332 (unsigned long)inode->i_ino);
331 goto error; 333 goto error;
332 } 334 }
333 if (f->metadata->size == sizeof(jdev.old_id)) 335 if (f->metadata->size == sizeof(jdev.old_id))
@@ -342,7 +344,8 @@ struct inode *jffs2_iget(struct super_block *sb, unsigned long ino)
342 break; 344 break;
343 345
344 default: 346 default:
345 printk(KERN_WARNING "jffs2_read_inode(): Bogus imode %o for ino %lu\n", inode->i_mode, (unsigned long)inode->i_ino); 347 pr_warn("%s(): Bogus i_mode %o for ino %lu\n",
348 __func__, inode->i_mode, (unsigned long)inode->i_ino);
346 } 349 }
347 350
348 mutex_unlock(&f->sem); 351 mutex_unlock(&f->sem);
@@ -510,11 +513,11 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
510 513
511#ifndef CONFIG_JFFS2_FS_WRITEBUFFER 514#ifndef CONFIG_JFFS2_FS_WRITEBUFFER
512 if (c->mtd->type == MTD_NANDFLASH) { 515 if (c->mtd->type == MTD_NANDFLASH) {
513 printk(KERN_ERR "jffs2: Cannot operate on NAND flash unless jffs2 NAND support is compiled in.\n"); 516 pr_err("jffs2: Cannot operate on NAND flash unless jffs2 NAND support is compiled in.\n");
514 return -EINVAL; 517 return -EINVAL;
515 } 518 }
516 if (c->mtd->type == MTD_DATAFLASH) { 519 if (c->mtd->type == MTD_DATAFLASH) {
517 printk(KERN_ERR "jffs2: Cannot operate on DataFlash unless jffs2 DataFlash support is compiled in.\n"); 520 pr_err("jffs2: Cannot operate on DataFlash unless jffs2 DataFlash support is compiled in.\n");
518 return -EINVAL; 521 return -EINVAL;
519 } 522 }
520#endif 523#endif
@@ -528,12 +531,13 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
528 */ 531 */
529 if ((c->sector_size * blocks) != c->flash_size) { 532 if ((c->sector_size * blocks) != c->flash_size) {
530 c->flash_size = c->sector_size * blocks; 533 c->flash_size = c->sector_size * blocks;
531 printk(KERN_INFO "jffs2: Flash size not aligned to erasesize, reducing to %dKiB\n", 534 pr_info("jffs2: Flash size not aligned to erasesize, reducing to %dKiB\n",
532 c->flash_size / 1024); 535 c->flash_size / 1024);
533 } 536 }
534 537
535 if (c->flash_size < 5*c->sector_size) { 538 if (c->flash_size < 5*c->sector_size) {
536 printk(KERN_ERR "jffs2: Too few erase blocks (%d)\n", c->flash_size / c->sector_size); 539 pr_err("jffs2: Too few erase blocks (%d)\n",
540 c->flash_size / c->sector_size);
537 return -EINVAL; 541 return -EINVAL;
538 } 542 }
539 543
@@ -658,8 +662,8 @@ struct jffs2_inode_info *jffs2_gc_fetch_inode(struct jffs2_sb_info *c,
658 return ERR_CAST(inode); 662 return ERR_CAST(inode);
659 } 663 }
660 if (is_bad_inode(inode)) { 664 if (is_bad_inode(inode)) {
661 printk(KERN_NOTICE "Eep. read_inode() failed for ino #%u. unlinked %d\n", 665 pr_notice("Eep. read_inode() failed for ino #%u. unlinked %d\n",
662 inum, unlinked); 666 inum, unlinked);
663 /* NB. This will happen again. We need to do something appropriate here. */ 667 /* NB. This will happen again. We need to do something appropriate here. */
664 iput(inode); 668 iput(inode);
665 return ERR_PTR(-EIO); 669 return ERR_PTR(-EIO);