[PATCH] Conditionalize debugging printks
Chris Lumens
clumens at redhat.com
Tue Feb 28 02:41:37 EST 2006
All the debugging output I'm seeing in the log files on my G5 means
relatively little to me, so this patch gives opportunity to turn it off.
It looks like relatively new code, which is why I didn't just default to
turning everything off.
- Chris
Signed-off-by: Chris Lumens <clumens at redhat.com>
---
arch/powerpc/platforms/powermac/pfunc_base.c | 6 ++++++
arch/powerpc/platforms/powermac/pfunc_core.c | 7 +++++++
2 files changed, 13 insertions(+), 0 deletions(-)
a192d232af68676eee3488d734bf334acce05453
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
index 4ffd2a9..8ea5bc0 100644
--- a/arch/powerpc/platforms/powermac/pfunc_base.c
+++ b/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -9,7 +9,13 @@
#include <asm/pmac_feature.h>
#include <asm/pmac_pfunc.h>
+#define DEBUG
+
+#ifdef DEBUG
#define DBG(fmt...) printk(fmt)
+#else
+#define DBG(fmt...)
+#endif
static irqreturn_t macio_gpio_irq(int irq, void *data, struct pt_regs *regs)
{
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 356a739..215d267 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -17,10 +17,17 @@
#include <asm/pmac_pfunc.h>
/* Debug */
+#define DEBUG
+
#define LOG_PARSE(fmt...)
#define LOG_ERROR(fmt...) printk(fmt)
#define LOG_BLOB(t,b,c)
+
+#ifdef DEBUG
#define DBG(fmt...) printk(fmt)
+#else
+#define DBG(fmt...)
+#endif
/* Command numbers */
#define PMF_CMD_LIST 0
--
1.2.3
More information about the Linuxppc64-dev
mailing list