Messages in this thread Patch in this message | | | Date | Wed, 12 Jul 2000 08:10:15 +0100 (BST) | From | Tigran Aivazian <> | Subject | Re: [patch] drivers/mtd/Config.in |
| |
> There are lots of things wrong with it. For instance, the author(s?) seem > to have overlooked Documentation/CodingStyle completely...
not only that, but also what Linus said recently, i.e. "a printk when nothing is wrong is a bug" (or something like that). If you look at fs/jffs/inode-v23.c:jffs_read_super() it has a couple of imho unnecessary printk()
Regards, Tigran
--- fs/jffs/inode-v23.c.0 Wed Jul 12 08:05:44 2000 +++ fs/jffs/inode-v23.c Wed Jul 12 08:07:27 2000 @@ -71,10 +71,7 @@ kdev_t dev = sb->s_dev; struct inode *root_inode; - printk(KERN_NOTICE "JFFS: Trying to mount device %s.\n", - kdevname(dev)); - - if (MAJOR(dev)!=MTD_BLOCK_MAJOR) { + if (!silent && MAJOR(dev)!=MTD_BLOCK_MAJOR) { printk(KERN_WARNING "JFFS: Trying to mount non-mtd device.\n"); return 0; } @@ -85,9 +82,8 @@ sb->u.generic_sbp = (void *) 0; /* Build the file system. */ - if (jffs_build_fs(sb) < 0) { + if (jffs_build_fs(sb) < 0) goto jffs_sb_err1; - } /* * set up enough so that we can read an inode @@ -100,17 +96,14 @@ goto jffs_sb_err2; /* Get the root directory of this file system. */ - if (!(sb->s_root = d_alloc_root(root_inode))) { + if (!(sb->s_root = d_alloc_root(root_inode))) goto jffs_sb_err3; - } #ifdef USE_GC /* Do a garbage collect every time we mount. */ jffs_garbage_collect((struct jffs_control *)sb->u.generic_sbp); #endif - printk(KERN_NOTICE "JFFS: Successfully mounted device %s.\n", - kdevname(dev)); return sb; jffs_sb_err3: @@ -119,8 +112,9 @@ jffs_cleanup_control((struct jffs_control *)sb->u.generic_sbp); jffs_sb_err1: - printk(KERN_WARNING "JFFS: Failed to mount device %s.\n", - kdevname(dev)); + if (!silent) + printk(KERN_WARNING "JFFS: Failed to mount device %s.\n", + kdevname(dev)); return 0; }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |