public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] - bay.c - convert macro to function
@ 2007-11-01 22:45 Joe Perches
  0 siblings, 0 replies; only message in thread
From: Joe Perches @ 2007-11-01 22:45 UTC (permalink / raw)
  To: Kristen Carlson Accardi; +Cc: linux-acpi

Convert bay_dprintk from macro to function.

Compiled/untested x86
Reduces image size ~250 bytes.

old:
$ size drivers/acpi/bay.o
   text    data     bss     dec     hex filename
   2088      48       0    2136     858 drivers/acpi/bay.o

new:
$ size drivers/acpi/bay.o
   text    data     bss     dec     hex filename
   1716      48       0    1764     6e4 drivers/acpi/bay.o

Signed-off-by: Joe Perches <joe@perches.com>

---

diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c
index 6daf608..93c735b 100644
--- a/drivers/acpi/bay.c
+++ b/drivers/acpi/bay.c
@@ -39,11 +39,7 @@ MODULE_LICENSE("GPL");
 #define ACPI_BAY_CLASS "bay"
 #define ACPI_BAY_COMPONENT	0x10000000
 #define _COMPONENT ACPI_BAY_COMPONENT
-#define bay_dprintk(h,s) {\
-	char prefix[80] = {'\0'};\
-	struct acpi_buffer buffer = {sizeof(prefix), prefix};\
-	acpi_get_name(h, ACPI_FULL_PATHNAME, &buffer);\
-	printk(KERN_DEBUG PREFIX "%s: %s\n", prefix, s); }
+
 static void bay_notify(acpi_handle handle, u32 event, void *data);
 
 struct bay {
@@ -55,6 +51,14 @@ struct bay {
 
 static LIST_HEAD(drive_bays);
 
+static void bay_dprintk(acpi_handle handle, const char *string)
+{
+	char prefix[80] = {'\0'};
+	struct acpi_buffer buffer = {sizeof(prefix), prefix};
+
+	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
+	printk(KERN_DEBUG PREFIX "%s: %s\n", prefix, string);
+}
 
 /*****************************************************************************
  *                         Drive Bay functions                               *



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-01 22:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-01 22:45 [PATCH] - bay.c - convert macro to function Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox