lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20080613190800.GI8813@redhat.com>
Date:	Fri, 13 Jun 2008 15:08:07 -0400
From:	Jason Baron <jbaron@...hat.com>
To:	akpm@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org, joe@...ches.com, greg@...ah.com,
	nick@...k-andrew.net, randy.dunlap@...cle.com
Subject: [PATCH 8/8] dynamic debug - convert sound


-convert sound to dynamic debug

Signed-off-by: Jason Baron <jbaron@...hat.com>

---

 include/sound/core.h |   14 ++++++++++----
 sound/core/misc.c    |    2 +-
 2 files changed, 11 insertions(+), 5 deletions(-)


diff --git a/include/sound/core.h b/include/sound/core.h
index 4fc0235..956b867 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -364,7 +364,11 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
 	printk(fmt ,##args)
 #endif
 
-#ifdef CONFIG_SND_DEBUG
+#if defined(CONFIG_SND_DEBUG) && !defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
+#define DEBUG 1
+#endif
+
+#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
 
 #define __ASTRING__(x) #x
 
@@ -376,11 +380,13 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
  * Compiled only when Works like snd_printk() for debugging purpose.
  * Ignored when CONFIG_SND_DEBUG is not set.
  */
-#define snd_printd(fmt, args...) \
-	snd_verbose_printd(__FILE__, __LINE__, fmt ,##args)
+#define snd_printd(fmt, args...) do { \
+	if (dynamic_dbg_enabled(TYPE_BOOLEAN, 0, 0)) \
+		snd_verbose_printd(__FILE__, __LINE__, fmt, ##args); \
+	} while (0)
 #else
 #define snd_printd(fmt, args...) \
-	printk(fmt ,##args)
+	pr_debug(fmt, ##args)
 #endif
 /**
  * snd_assert - run-time assertion macro
diff --git a/sound/core/misc.c b/sound/core/misc.c
index 102d1c3..9f53c0a 100644
--- a/sound/core/misc.c
+++ b/sound/core/misc.c
@@ -55,7 +55,7 @@ void snd_verbose_printk(const char *file, int line, const char *format, ...)
 EXPORT_SYMBOL(snd_verbose_printk);
 #endif
 
-#if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK)
+#if (defined(CONFIG_SND_DEBUG) || defined(CONFIG_DYNAMIC_PRINTK_DEBUG)) && defined(CONFIG_SND_VERBOSE_PRINTK)
 void snd_verbose_printd(const char *file, int line, const char *format, ...)
 {
 	va_list args;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ