[PATCH 2/4] reiserfs: use pr_* routines instead of printk(KERN_*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jeff Mahoney <jeffm@xxxxxxxx>

This cleans up the reiserfs code a bit by using the pr_* print macros
instead of the old KERN_* way.

Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx>
---
 fs/reiserfs/prints.c | 41 +++++++++++++++++++----------------------
 fs/reiserfs/super.c  |  2 +-
 2 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c
index e5e66695f17f..a097ece64789 100644
--- a/fs/reiserfs/prints.c
+++ b/fs/reiserfs/prints.c
@@ -314,11 +314,11 @@ void __reiserfs_warning(struct super_block *sb, const char *id,
 {
 	do_reiserfs_warning(fmt);
 	if (sb)
-		printk(KERN_WARNING "REISERFS warning (device %s): %s%s%s: "
-		       "%s\n", sb->s_id, id ? id : "", id ? " " : "",
-		       function, error_buf);
+		pr_warn("REISERFS warning (device %s): %s%s%s: %s\n",
+			sb->s_id, id ? id : "", id ? " " : "",
+			function, error_buf);
 	else
-		printk(KERN_WARNING "REISERFS warning: %s%s%s: %s\n",
+		pr_warn("REISERFS warning: %s%s%s: %s\n",
 		       id ? id : "", id ? " " : "", function, error_buf);
 }
 
@@ -327,10 +327,9 @@ void reiserfs_info(struct super_block *sb, const char *fmt, ...)
 {
 	do_reiserfs_warning(fmt);
 	if (sb)
-		printk(KERN_NOTICE "REISERFS (device %s): %s",
-		       sb->s_id, error_buf);
+		pr_notice("REISERFS (device %s): %s", sb->s_id, error_buf);
 	else
-		printk(KERN_NOTICE "REISERFS %s:", error_buf);
+		pr_notice("REISERFS %s:", error_buf);
 }
 
 /* No newline.. reiserfs_printk calls can be followed by printk's */
@@ -345,10 +344,10 @@ void reiserfs_debug(struct super_block *s, int level, const char *fmt, ...)
 #ifdef CONFIG_REISERFS_CHECK
 	do_reiserfs_warning(fmt);
 	if (s)
-		printk(KERN_DEBUG "REISERFS debug (device %s): %s\n",
+		pr_debug("REISERFS debug (device %s): %s\n",
 		       s->s_id, error_buf);
 	else
-		printk(KERN_DEBUG "REISERFS debug: %s\n", error_buf);
+		pr_debug("REISERFS debug: %s\n", error_buf);
 #endif
 }
 
@@ -408,12 +407,12 @@ void __reiserfs_panic(struct super_block *sb, const char *id,
 	dump_stack();
 #endif
 	if (sb)
-		printk(KERN_WARNING "REISERFS panic (device %s): %s%s%s: %s\n",
-		      sb->s_id, id ? id : "", id ? " " : "",
-		      function, error_buf);
+		pr_crit("REISERFS panic (device %s): %s%s%s: %s\n",
+			sb->s_id, id ? id : "", id ? " " : "",
+			function, error_buf);
 	else
-		printk(KERN_WARNING "REISERFS panic: %s%s%s: %s\n",
-		      id ? id : "", id ? " " : "", function, error_buf);
+		pr_crit("REISERFS panic: %s%s%s: %s\n",
+			id ? id : "", id ? " " : "", function, error_buf);
 	BUG();
 }
 
@@ -428,11 +427,11 @@ void __reiserfs_error(struct super_block *sb, const char *id,
 		__reiserfs_panic(sb, id, function, error_buf);
 
 	if (id && id[0])
-		printk(KERN_CRIT "REISERFS error (device %s): %s %s: %s\n",
-		       sb->s_id, id, function, error_buf);
+		pr_crit("REISERFS error (device %s): %s %s: %s\n",
+		        sb->s_id, id, function, error_buf);
 	else
-		printk(KERN_CRIT "REISERFS error (device %s): %s: %s\n",
-		       sb->s_id, function, error_buf);
+		pr_crit("REISERFS error (device %s): %s: %s\n",
+		        sb->s_id, function, error_buf);
 
 	if (sb_rdonly(sb))
 		return;
@@ -447,15 +446,13 @@ void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...)
 	do_reiserfs_warning(fmt);
 
 	if (reiserfs_error_panic(sb)) {
-		panic(KERN_CRIT "REISERFS panic (device %s): %s\n", sb->s_id,
-		      error_buf);
+		panic("REISERFS panic (device %s): %s\n", sb->s_id, error_buf);
 	}
 
 	if (reiserfs_is_journal_aborted(SB_JOURNAL(sb)))
 		return;
 
-	printk(KERN_CRIT "REISERFS abort (device %s): %s\n", sb->s_id,
-	       error_buf);
+	pr_crit("REISERFS abort (device %s): %s\n", sb->s_id, error_buf);
 
 	sb->s_flags |= SB_RDONLY;
 	reiserfs_abort_journal(sb, errno);
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 1fc934d24459..0a773b602623 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -2548,7 +2548,7 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type,
 	struct buffer_head tmp_bh, *bh;
 
 	if (!current->journal_info) {
-		printk(KERN_WARNING "reiserfs: Quota write (off=%llu, len=%llu) cancelled because transaction is not started.\n",
+		pr_warn("reiserfs: Quota write (off=%llu, len=%llu) cancelled because transaction is not started.\n",
 			(unsigned long long)off, (unsigned long long)len);
 		return -EIO;
 	}
-- 
2.12.3

--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux