aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/namespace/nsutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/namespace/nsutils.c')
-rw-r--r--drivers/acpi/namespace/nsutils.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c
index 549075fb9f88..bc779fdd3caf 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,14 +75,12 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node *node_to_search);
76void 75void
77acpi_ns_report_error(char *module_name, 76acpi_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 */
@@ -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,
134void 130void
135acpi_ns_report_method_error(char *module_name, 131acpi_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,7 +242,7 @@ 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_REPORT_WARNING(("Null Node parameter\n"));
252 return_UINT32(ACPI_TYPE_ANY); 246 return_UINT32(ACPI_TYPE_ANY);
253 } 247 }
254 248
@@ -275,7 +269,7 @@ 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_REPORT_WARNING(("Invalid Object Type %X\n", type));
279 return_UINT32(ACPI_NS_NORMAL); 273 return_UINT32(ACPI_NS_NORMAL);
280 } 274 }
281 275
@@ -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_REPORT_ERROR(("Invalid internal name\n"));
631 return_ACPI_STATUS(AE_BAD_PATHNAME); 625 return_ACPI_STATUS(AE_BAD_PATHNAME);
632 } 626 }
633 627
@@ -803,8 +797,7 @@ 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_REPORT_WARNING(("Invalid Object Type %X\n", type));
807 type));
808 return_UINT32(ACPI_NS_NORMAL); 801 return_UINT32(ACPI_NS_NORMAL);
809 } 802 }
810 803