All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net,
	Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Subject: [PATCH 04/12] thinkpad-acpi: cleanup debug helpers
Date: Sat,  4 Apr 2009 01:25:45 -0300	[thread overview]
Message-ID: <1238819153-16004-5-git-send-email-hmh@hmh.eng.br> (raw)
In-Reply-To: <1238819153-16004-1-git-send-email-hmh@hmh.eng.br>

Fix the vdbg_printk macro definition to be sane when
CONFIG_THINKPAD_ACPI_DEBUG is undefined, and move the mess into a file
section of its own.

This doesn't change anything in the current code, but future code will
need the proper behaviour.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
---
 drivers/platform/x86/thinkpad_acpi.c |   29 ++++++++++++++++++-----------
 1 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 5fd5549..0a01f76 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -184,17 +184,6 @@ enum {
 #define TPACPI_DBG_ALL		0xffff
 #define TPACPI_DBG_INIT		0x0001
 #define TPACPI_DBG_EXIT		0x0002
-#define dbg_printk(a_dbg_level, format, arg...) \
-	do { if (dbg_level & a_dbg_level) \
-		printk(TPACPI_DEBUG "%s: " format, __func__ , ## arg); \
-	} while (0)
-#ifdef CONFIG_THINKPAD_ACPI_DEBUG
-#define vdbg_printk(a_dbg_level, format, arg...) \
-	dbg_printk(a_dbg_level, format, ## arg)
-static const char *str_supported(int is_supported);
-#else
-#define vdbg_printk(a_dbg_level, format, arg...)
-#endif
 
 #define onoff(status, bit) ((status) & (1 << (bit)) ? "on" : "off")
 #define enabled(status, bit) ((status) & (1 << (bit)) ? "enabled" : "disabled")
@@ -326,6 +315,24 @@ static int tpacpi_uwb_emulstate;
 #endif
 
 
+/*************************************************************************
+ *  Debugging helpers
+ */
+
+#define dbg_printk(a_dbg_level, format, arg...) \
+	do { if (dbg_level & (a_dbg_level)) \
+		printk(TPACPI_DEBUG "%s: " format, __func__ , ## arg); \
+	} while (0)
+
+#ifdef CONFIG_THINKPAD_ACPI_DEBUG
+#define vdbg_printk dbg_printk
+static const char *str_supported(int is_supported);
+#else
+#define vdbg_printk(a_dbg_level, format, arg...) \
+	do { } while (0)
+#endif
+
+
 /****************************************************************************
  ****************************************************************************
  *
-- 
1.6.2.1


  parent reply	other threads:[~2009-04-04  4:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-04  4:25 [GIT PATCH] thinkpad-acpi queue for 2.6.30 Henrique de Moraes Holschuh
2009-04-04  4:25 ` [PATCH 01/12] thinkpad-acpi: update copyright notices Henrique de Moraes Holschuh
2009-04-04  4:25 ` [PATCH 02/12] thinkpad-acpi: drop ibm-acpi alias Henrique de Moraes Holschuh
2009-04-04  4:25 ` [PATCH 03/12] thinkpad-acpi: documentation cleanup Henrique de Moraes Holschuh
2009-04-04  4:25 ` Henrique de Moraes Holschuh [this message]
2009-04-04  4:25 ` [PATCH 05/12] thinkpad-acpi: add missing log levels Henrique de Moraes Holschuh
2009-04-04  4:25 ` [PATCH 06/12] thinkpad-acpi: add new debug helpers and warn of deprecated atts Henrique de Moraes Holschuh
2009-04-04  4:25 ` [PATCH 07/12] thinkpad-acpi: remove HKEY disable functionality Henrique de Moraes Holschuh
2009-10-29  6:58   ` remove HKEY disable functionality (triggers Ubuntu Karmic regression) Mark Stosberg
2009-10-29 22:46     ` Henrique de Moraes Holschuh
2009-04-04  4:25 ` [PATCH 08/12] thinkpad-acpi: restrict access to some firmware LEDs Henrique de Moraes Holschuh
2009-04-04  4:25 ` [PATCH 09/12] thinkpad-acpi: enhanced debugging messages for rfkill subdrivers Henrique de Moraes Holschuh
2009-04-04  4:25 ` [PATCH 10/12] thinkpad-acpi: enhanced debugging messages for the hotkey subdriver Henrique de Moraes Holschuh
2009-04-04  4:25 ` [PATCH 11/12] thinkpad-acpi: enhanced debugging messages for the fan subdriver Henrique de Moraes Holschuh
     [not found] ` <1238819153-16004-1-git-send-email-hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org>
2009-04-04  4:25   ` [PATCH 12/12] thinkpad-acpi: rework brightness support Henrique de Moraes Holschuh
2009-04-04  7:36 ` [GIT PATCH] thinkpad-acpi queue for 2.6.30 Len Brown

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=1238819153-16004-5-git-send-email-hmh@hmh.eng.br \
    --to=hmh@hmh.eng.br \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.