From: Joe Perches <joe@perches.com>
To: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Cc: linux-acpi@vger.kernel.org
Subject: [PATCH] - bay.c - convert macro to function
Date: Thu, 01 Nov 2007 15:45:40 -0700 [thread overview]
Message-ID: <1193957140.21506.5.camel@localhost> (raw)
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 *
reply other threads:[~2007-11-01 22:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1193957140.21506.5.camel@localhost \
--to=joe@perches.com \
--cc=kristen.c.accardi@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox