linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Holton <fholton@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Frank Holton <fholton@gmail.com>
Subject: [PATCH 2/2] Btrfs: make btrfs_debug match pr_debug handling related to DEBUG
Date: Tue, 12 Nov 2013 19:22:53 -0500	[thread overview]
Message-ID: <1384302173-32075-3-git-send-email-fholton@gmail.com> (raw)
In-Reply-To: <1384302173-32075-1-git-send-email-fholton@gmail.com>

The kernel macro pr_debug is defined as a empty statement when DEBUG is
not defined. Make btrfs_debug match pr_debug to avoid spamming
the kernel log with debug messages

Signed-off-by: Frank Holton <fholton@gmail.com>
---
 fs/btrfs/ctree.h |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index e319d25..3969133 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -3809,8 +3809,14 @@ void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...)
 	btrfs_printk(fs_info, KERN_NOTICE fmt, ##args)
 #define btrfs_info(fs_info, fmt, args...) \
 	btrfs_printk(fs_info, KERN_INFO fmt, ##args)
+
+#ifdef DEBUG
 #define btrfs_debug(fs_info, fmt, args...) \
 	btrfs_printk(fs_info, KERN_DEBUG fmt, ##args)
+#else
+#define btrfs_debug(fs_info, fmt, args...) \
+    no_printk(KERN_DEBUG fmt, ##args)
+#endif
 
 #ifdef CONFIG_BTRFS_ASSERT
 
-- 
1.7.9.5


      parent reply	other threads:[~2013-11-13  0:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13  0:22 [PATCH v2 0/2] Change printk to btrfs_* where applicable Frank Holton
2013-11-13  0:22 ` [PATCH v2 1/2] Btrfs: convert printk and pr_ to btrfs_* and fix btrfs: prefix Frank Holton
2013-11-14 15:25   ` David Sterba
2013-11-14 19:51     ` Frank Holton
2013-11-13  0:22 ` Frank Holton [this message]

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=1384302173-32075-3-git-send-email-fholton@gmail.com \
    --to=fholton@gmail.com \
    --cc=linux-btrfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).