diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-02-15 20:07:19 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-16 00:40:28 -0500 |
commit | 4fd7f5188c377c1e9aa8f224f6edf96d170a7d32 (patch) | |
tree | 9023a131246f56974bafed5260a6baaa6d918219 /drivers/acpi | |
parent | 5958f1a4da39581074bab50cabd0a582e651b90f (diff) |
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 <harvey.harrison@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | 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 34f157571080..eba55b7d6c95 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c | |||
@@ -36,16 +36,20 @@ ACPI_MODULE_NAME("utils"); | |||
36 | /* -------------------------------------------------------------------------- | 36 | /* -------------------------------------------------------------------------- |
37 | Object Evaluation Helpers | 37 | Object Evaluation Helpers |
38 | -------------------------------------------------------------------------- */ | 38 | -------------------------------------------------------------------------- */ |
39 | static void | ||
40 | acpi_util_eval_error(acpi_handle h, acpi_string p, acpi_status s) | ||
41 | { | ||
39 | #ifdef ACPI_DEBUG_OUTPUT | 42 | #ifdef ACPI_DEBUG_OUTPUT |
40 | #define acpi_util_eval_error(h,p,s) {\ | 43 | char prefix[80] = {'\0'}; |
41 | char prefix[80] = {'\0'};\ | 44 | struct acpi_buffer buffer = {sizeof(prefix), prefix}; |
42 | struct acpi_buffer buffer = {sizeof(prefix), prefix};\ | 45 | acpi_get_name(h, ACPI_FULL_PATHNAME, &buffer); |
43 | acpi_get_name(h, ACPI_FULL_PATHNAME, &buffer);\ | 46 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluate [%s.%s]: %s\n", |
44 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluate [%s.%s]: %s\n",\ | 47 | (char *) prefix, p, acpi_format_exception(s))); |
45 | (char *) prefix, p, acpi_format_exception(s))); } | ||
46 | #else | 48 | #else |
47 | #define acpi_util_eval_error(h,p,s) | 49 | return; |
48 | #endif | 50 | #endif |
51 | } | ||
52 | |||
49 | acpi_status | 53 | acpi_status |
50 | acpi_extract_package(union acpi_object *package, | 54 | acpi_extract_package(union acpi_object *package, |
51 | struct acpi_buffer *format, struct acpi_buffer *buffer) | 55 | struct acpi_buffer *format, struct acpi_buffer *buffer) |