diff options
Diffstat (limited to 'drivers/acpi/namespace/nsutils.c')
| -rw-r--r-- | drivers/acpi/namespace/nsutils.c | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c index ebec036423c9..3e7cad549a38 100644 --- a/drivers/acpi/namespace/nsutils.c +++ b/drivers/acpi/namespace/nsutils.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
| 7 | 7 | ||
| 8 | /* | 8 | /* |
| 9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 10 | * All rights reserved. | 10 | * All rights reserved. |
| 11 | * | 11 | * |
| 12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
| @@ -63,7 +63,6 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node *node_to_search); | |||
| 63 | * | 63 | * |
| 64 | * PARAMETERS: module_name - Caller's module name (for error output) | 64 | * PARAMETERS: module_name - Caller's module name (for error output) |
| 65 | * line_number - Caller's line number (for error output) | 65 | * line_number - Caller's line number (for error output) |
| 66 | * component_id - Caller's component ID (for error output) | ||
| 67 | * internal_name - Name or path of the namespace node | 66 | * internal_name - Name or path of the namespace node |
| 68 | * lookup_status - Exception code from NS lookup | 67 | * lookup_status - Exception code from NS lookup |
| 69 | * | 68 | * |
| @@ -76,19 +75,17 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node *node_to_search); | |||
| 76 | void | 75 | void |
| 77 | acpi_ns_report_error(char *module_name, | 76 | acpi_ns_report_error(char *module_name, |
| 78 | u32 line_number, | 77 | u32 line_number, |
| 79 | u32 component_id, | ||
| 80 | char *internal_name, acpi_status lookup_status) | 78 | char *internal_name, acpi_status lookup_status) |
| 81 | { | 79 | { |
| 82 | acpi_status status; | 80 | acpi_status status; |
| 83 | char *name = NULL; | 81 | char *name = NULL; |
| 84 | 82 | ||
| 85 | acpi_os_printf("%8s-%04d: *** Error: Looking up ", | 83 | acpi_ut_report_error(module_name, line_number); |
| 86 | module_name, line_number); | ||
| 87 | 84 | ||
| 88 | if (lookup_status == AE_BAD_CHARACTER) { | 85 | if (lookup_status == AE_BAD_CHARACTER) { |
| 89 | /* There is a non-ascii character in the name */ | 86 | /* There is a non-ascii character in the name */ |
| 90 | 87 | ||
| 91 | acpi_os_printf("[0x%4.4X] (NON-ASCII)\n", | 88 | acpi_os_printf("[0x%4.4X] (NON-ASCII)", |
| 92 | *(ACPI_CAST_PTR(u32, internal_name))); | 89 | *(ACPI_CAST_PTR(u32, internal_name))); |
| 93 | } else { | 90 | } else { |
| 94 | /* Convert path to external format */ | 91 | /* Convert path to external format */ |
| @@ -109,7 +106,7 @@ acpi_ns_report_error(char *module_name, | |||
| 109 | } | 106 | } |
| 110 | } | 107 | } |
| 111 | 108 | ||
| 112 | acpi_os_printf(" in namespace, %s\n", | 109 | acpi_os_printf(" Namespace lookup failure, %s\n", |
| 113 | acpi_format_exception(lookup_status)); | 110 | acpi_format_exception(lookup_status)); |
| 114 | } | 111 | } |
| 115 | 112 | ||
| @@ -119,10 +116,9 @@ acpi_ns_report_error(char *module_name, | |||
| 119 | * | 116 | * |
| 120 | * PARAMETERS: module_name - Caller's module name (for error output) | 117 | * PARAMETERS: module_name - Caller's module name (for error output) |
| 121 | * line_number - Caller's line number (for error output) | 118 | * line_number - Caller's line number (for error output) |
| 122 | * component_id - Caller's component ID (for error output) | ||
| 123 | * Message - Error message to use on failure | 119 | * Message - Error message to use on failure |
| 124 | * prefix_node - Prefix relative to the path | 120 | * prefix_node - Prefix relative to the path |
| 125 | * Path - Path to the node | 121 | * Path - Path to the node (optional) |
| 126 | * method_status - Execution status | 122 | * method_status - Execution status |
| 127 | * | 123 | * |
| 128 | * RETURN: None | 124 | * RETURN: None |
| @@ -134,7 +130,6 @@ acpi_ns_report_error(char *module_name, | |||
| 134 | void | 130 | void |
| 135 | acpi_ns_report_method_error(char *module_name, | 131 | acpi_ns_report_method_error(char *module_name, |
| 136 | u32 line_number, | 132 | u32 line_number, |
| 137 | u32 component_id, | ||
| 138 | char *message, | 133 | char *message, |
| 139 | struct acpi_namespace_node *prefix_node, | 134 | struct acpi_namespace_node *prefix_node, |
| 140 | char *path, acpi_status method_status) | 135 | char *path, acpi_status method_status) |
| @@ -142,17 +137,16 @@ acpi_ns_report_method_error(char *module_name, | |||
| 142 | acpi_status status; | 137 | acpi_status status; |
| 143 | struct acpi_namespace_node *node = prefix_node; | 138 | struct acpi_namespace_node *node = prefix_node; |
| 144 | 139 | ||
| 140 | acpi_ut_report_error(module_name, line_number); | ||
| 141 | |||
| 145 | if (path) { | 142 | if (path) { |
| 146 | status = acpi_ns_get_node_by_path(path, prefix_node, | 143 | status = acpi_ns_get_node_by_path(path, prefix_node, |
| 147 | ACPI_NS_NO_UPSEARCH, &node); | 144 | ACPI_NS_NO_UPSEARCH, &node); |
| 148 | if (ACPI_FAILURE(status)) { | 145 | if (ACPI_FAILURE(status)) { |
| 149 | acpi_os_printf | 146 | acpi_os_printf("[Could not get node by pathname]"); |
| 150 | ("report_method_error: Could not get node\n"); | ||
| 151 | return; | ||
| 152 | } | 147 | } |
| 153 | } | 148 | } |
| 154 | 149 | ||
| 155 | acpi_os_printf("%8s-%04d: *** Error: ", module_name, line_number); | ||
| 156 | acpi_ns_print_node_pathname(node, message); | 150 | acpi_ns_print_node_pathname(node, message); |
| 157 | acpi_os_printf(", %s\n", acpi_format_exception(method_status)); | 151 | acpi_os_printf(", %s\n", acpi_format_exception(method_status)); |
| 158 | } | 152 | } |
| @@ -248,11 +242,11 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node) | |||
| 248 | ACPI_FUNCTION_TRACE("ns_get_type"); | 242 | ACPI_FUNCTION_TRACE("ns_get_type"); |
| 249 | 243 | ||
| 250 | if (!node) { | 244 | if (!node) { |
| 251 | ACPI_REPORT_WARNING(("ns_get_type: Null Node input pointer\n")); | 245 | ACPI_WARNING((AE_INFO, "Null Node parameter")); |
| 252 | return_VALUE(ACPI_TYPE_ANY); | 246 | return_UINT32(ACPI_TYPE_ANY); |
| 253 | } | 247 | } |
| 254 | 248 | ||
| 255 | return_VALUE((acpi_object_type) node->type); | 249 | return_UINT32((acpi_object_type) node->type); |
| 256 | } | 250 | } |
| 257 | 251 | ||
| 258 | /******************************************************************************* | 252 | /******************************************************************************* |
| @@ -275,11 +269,11 @@ u32 acpi_ns_local(acpi_object_type type) | |||
| 275 | if (!acpi_ut_valid_object_type(type)) { | 269 | if (!acpi_ut_valid_object_type(type)) { |
| 276 | /* Type code out of range */ | 270 | /* Type code out of range */ |
| 277 | 271 | ||
| 278 | ACPI_REPORT_WARNING(("ns_local: Invalid Object Type\n")); | 272 | ACPI_WARNING((AE_INFO, "Invalid Object Type %X", type)); |
| 279 | return_VALUE(ACPI_NS_NORMAL); | 273 | return_UINT32(ACPI_NS_NORMAL); |
| 280 | } | 274 | } |
| 281 | 275 | ||
| 282 | return_VALUE((u32) acpi_gbl_ns_properties[type] & ACPI_NS_LOCAL); | 276 | return_UINT32((u32) acpi_gbl_ns_properties[type] & ACPI_NS_LOCAL); |
| 283 | } | 277 | } |
| 284 | 278 | ||
| 285 | /******************************************************************************* | 279 | /******************************************************************************* |
| @@ -627,7 +621,7 @@ acpi_ns_externalize_name(u32 internal_name_length, | |||
| 627 | * with internal_name (invalid format). | 621 | * with internal_name (invalid format). |
| 628 | */ | 622 | */ |
| 629 | if (required_length > internal_name_length) { | 623 | if (required_length > internal_name_length) { |
| 630 | ACPI_REPORT_ERROR(("ns_externalize_name: Invalid internal name\n")); | 624 | ACPI_ERROR((AE_INFO, "Invalid internal name")); |
| 631 | return_ACPI_STATUS(AE_BAD_PATHNAME); | 625 | return_ACPI_STATUS(AE_BAD_PATHNAME); |
| 632 | } | 626 | } |
| 633 | 627 | ||
| @@ -803,12 +797,11 @@ u32 acpi_ns_opens_scope(acpi_object_type type) | |||
| 803 | if (!acpi_ut_valid_object_type(type)) { | 797 | if (!acpi_ut_valid_object_type(type)) { |
| 804 | /* type code out of range */ | 798 | /* type code out of range */ |
| 805 | 799 | ||
| 806 | ACPI_REPORT_WARNING(("ns_opens_scope: Invalid Object Type %X\n", | 800 | ACPI_WARNING((AE_INFO, "Invalid Object Type %X", type)); |
| 807 | type)); | 801 | return_UINT32(ACPI_NS_NORMAL); |
| 808 | return_VALUE(ACPI_NS_NORMAL); | ||
| 809 | } | 802 | } |
| 810 | 803 | ||
| 811 | return_VALUE(((u32) acpi_gbl_ns_properties[type]) & ACPI_NS_NEWSCOPE); | 804 | return_UINT32(((u32) acpi_gbl_ns_properties[type]) & ACPI_NS_NEWSCOPE); |
| 812 | } | 805 | } |
| 813 | 806 | ||
| 814 | /******************************************************************************* | 807 | /******************************************************************************* |
