mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] fs ubifs: Use pr_* for printing messages
Date: Mon, 13 Jan 2014 10:59:36 +0100	[thread overview]
Message-ID: <1389607176-18335-1-git-send-email-s.hauer@pengutronix.de> (raw)

Unline the printk(KERN_* the pr_* functions cooperate with the
barebox loglevel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 fs/ubifs/debug.h | 10 +++++-----
 fs/ubifs/ubifs.h |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
index 62617b6..dbc7f18 100644
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -85,7 +85,7 @@ struct ubifs_debug_info {
 
 #define ubifs_assert(expr) do {                                                \
 	if (unlikely(!(expr))) {                                               \
-		printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \
+		pr_crit("UBIFS assert failed in %s at %u (pid %d)\n", \
 		       __func__, __LINE__, 0);                      \
 		dbg_dump_stack();                                              \
 	}                                                                      \
@@ -94,7 +94,7 @@ struct ubifs_debug_info {
 #define ubifs_assert_cmt_locked(c) do {                                        \
 	if (unlikely(down_write_trylock(&(c)->commit_sem))) {                  \
 		up_write(&(c)->commit_sem);                                    \
-		printk(KERN_CRIT "commit lock is not locked!\n");              \
+		pr_crit("commit lock is not locked!\n");		      \
 		ubifs_assert(0);                                               \
 	}                                                                      \
 } while (0)
@@ -107,7 +107,7 @@ struct ubifs_debug_info {
 /* Generic debugging messages */
 #define dbg_msg(fmt, ...) do {                                                 \
 	spin_lock(&dbg_lock);                                                  \
-	printk(KERN_DEBUG "UBIFS DBG (pid %d): %s: " fmt "\n", 0,   \
+	pr_debug("UBIFS DBG (pid %d): %s: " fmt "\n", 0,   \
 	       __func__, ##__VA_ARGS__);                                       \
 	spin_unlock(&dbg_lock);                                                \
 } while (0)
@@ -310,7 +310,7 @@ void ubifs_debugging_exit(struct ubifs_info *c);
 /* Use "if (0)" to make compiler check arguments even if debugging is off */
 #define ubifs_assert(expr)  do {                                               \
 	if (0 && (expr))                                                       \
-		printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \
+		pr_crit("UBIFS assert failed in %s at %u (pid %d)\n", \
 		       __func__, __LINE__, 0);                      \
 } while (0)
 
@@ -321,7 +321,7 @@ void ubifs_debugging_exit(struct ubifs_info *c);
 
 #define dbg_msg(fmt, ...) do {                                                 \
 	if (0)                                                                 \
-		printk(KERN_DEBUG "UBIFS DBG (pid %d): %s: " fmt "\n",         \
+		pr_debug("UBIFS DBG (pid %d): %s: " fmt "\n",         \
 		       0, __func__, ##__VA_ARGS__);                 \
 } while (0)
 
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 1e6c0f5..fea1584 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -474,15 +474,15 @@ static inline ino_t parent_ino(struct dentry *dentry)
 #define ubifs_msg(fmt, ...)
 #else
 #define ubifs_msg(fmt, ...) \
-		printk(KERN_NOTICE "UBIFS: " fmt "\n", ##__VA_ARGS__)
+		pr_notice("UBIFS: " fmt "\n", ##__VA_ARGS__)
 #endif
 /* UBIFS error messages */
 #define ubifs_err(fmt, ...)                                                  \
-	printk(KERN_ERR "UBIFS error (pid %d): %s: " fmt "\n", 0, \
+	pr_err("UBIFS error (pid %d): %s: " fmt "\n", 0, \
 	       __func__, ##__VA_ARGS__)
 /* UBIFS warning messages */
 #define ubifs_warn(fmt, ...)                                         \
-	printk(KERN_WARNING "UBIFS warning (pid %d): %s: " fmt "\n", \
+	pr_warn("UBIFS warning (pid %d): %s: " fmt "\n", \
 	       0, __func__, ##__VA_ARGS__)
 
 /* UBIFS file system VFS magic number */
-- 
1.8.5.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2014-01-13 10:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389607176-18335-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox