[PATCH] - bay.c - convert macro to function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>

---

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                               *


-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux