Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4fd7f5188c377c1e9aa8f224f6edf96d170a7d32
Commit:     4fd7f5188c377c1e9aa8f224f6edf96d170a7d32
Parent:     5958f1a4da39581074bab50cabd0a582e651b90f
Author:     Harvey Harrison <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 15 17:07:19 2008 -0800
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Sat Feb 16 00:40:28 2008 -0500

    ACPI: sparse fix, replace macro with static function
    
    replace acpi_util_eval_error macro with static function.
    
    Avoid these sparse warnings due to using buffer within the macro.
    drivers/acpi/utils.c:273:3: warning: symbol 'buffer' shadows an earlier one
    drivers/acpi/utils.c:259:21: originally declared here
    drivers/acpi/utils.c:279:3: warning: symbol 'buffer' shadows an earlier one
    drivers/acpi/utils.c:259:21: originally declared here
    drivers/acpi/utils.c:368:3: warning: symbol 'buffer' shadows an earlier one
    drivers/acpi/utils.c:348:21: originally declared here
    drivers/acpi/utils.c:375:3: warning: symbol 'buffer' shadows an earlier one
    drivers/acpi/utils.c:348:21: originally declared here
    drivers/acpi/utils.c:382:3: warning: symbol 'buffer' shadows an earlier one
    drivers/acpi/utils.c:348:21: originally declared here
    drivers/acpi/utils.c:402:4: warning: symbol 'buffer' shadows an earlier one
    drivers/acpi/utils.c:348:21: originally declared here
    
    Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/utils.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 34f1575..eba55b7 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -36,16 +36,20 @@ ACPI_MODULE_NAME("utils");
 /* --------------------------------------------------------------------------
                             Object Evaluation Helpers
    -------------------------------------------------------------------------- 
*/
+static void
+acpi_util_eval_error(acpi_handle h, acpi_string p, acpi_status s)
+{
 #ifdef ACPI_DEBUG_OUTPUT
-#define acpi_util_eval_error(h,p,s) {\
-       char prefix[80] = {'\0'};\
-       struct acpi_buffer buffer = {sizeof(prefix), prefix};\
-       acpi_get_name(h, ACPI_FULL_PATHNAME, &buffer);\
-       ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluate [%s.%s]: %s\n",\
-               (char *) prefix, p, acpi_format_exception(s))); }
+       char prefix[80] = {'\0'};
+       struct acpi_buffer buffer = {sizeof(prefix), prefix};
+       acpi_get_name(h, ACPI_FULL_PATHNAME, &buffer);
+       ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluate [%s.%s]: %s\n",
+               (char *) prefix, p, acpi_format_exception(s)));
 #else
-#define acpi_util_eval_error(h,p,s)
+       return;
 #endif
+}
+
 acpi_status
 acpi_extract_package(union acpi_object *package,
                     struct acpi_buffer *format, struct acpi_buffer *buffer)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to