diff options
Diffstat (limited to 'drivers/acpi/acpica/nsutils.c')
| -rw-r--r-- | drivers/acpi/acpica/nsutils.c | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c index e1add3491b04..a7d6ad9c111b 100644 --- a/drivers/acpi/acpica/nsutils.c +++ b/drivers/acpi/acpica/nsutils.c | |||
| @@ -60,104 +60,6 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node *node_to_search); | |||
| 60 | 60 | ||
| 61 | /******************************************************************************* | 61 | /******************************************************************************* |
| 62 | * | 62 | * |
| 63 | * FUNCTION: acpi_ns_report_error | ||
| 64 | * | ||
| 65 | * PARAMETERS: module_name - Caller's module name (for error output) | ||
| 66 | * line_number - Caller's line number (for error output) | ||
| 67 | * internal_name - Name or path of the namespace node | ||
| 68 | * lookup_status - Exception code from NS lookup | ||
| 69 | * | ||
| 70 | * RETURN: None | ||
| 71 | * | ||
| 72 | * DESCRIPTION: Print warning message with full pathname | ||
| 73 | * | ||
| 74 | ******************************************************************************/ | ||
| 75 | |||
| 76 | void | ||
| 77 | acpi_ns_report_error(const char *module_name, | ||
| 78 | u32 line_number, | ||
| 79 | const char *internal_name, acpi_status lookup_status) | ||
| 80 | { | ||
| 81 | acpi_status status; | ||
| 82 | u32 bad_name; | ||
| 83 | char *name = NULL; | ||
| 84 | |||
| 85 | acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number); | ||
| 86 | |||
| 87 | if (lookup_status == AE_BAD_CHARACTER) { | ||
| 88 | |||
| 89 | /* There is a non-ascii character in the name */ | ||
| 90 | |||
| 91 | ACPI_MOVE_32_TO_32(&bad_name, | ||
| 92 | ACPI_CAST_PTR(u32, internal_name)); | ||
| 93 | acpi_os_printf("[0x%4.4X] (NON-ASCII)", bad_name); | ||
| 94 | } else { | ||
| 95 | /* Convert path to external format */ | ||
| 96 | |||
| 97 | status = acpi_ns_externalize_name(ACPI_UINT32_MAX, | ||
| 98 | internal_name, NULL, &name); | ||
| 99 | |||
| 100 | /* Print target name */ | ||
| 101 | |||
| 102 | if (ACPI_SUCCESS(status)) { | ||
| 103 | acpi_os_printf("[%s]", name); | ||
| 104 | } else { | ||
| 105 | acpi_os_printf("[COULD NOT EXTERNALIZE NAME]"); | ||
| 106 | } | ||
| 107 | |||
| 108 | if (name) { | ||
| 109 | ACPI_FREE(name); | ||
| 110 | } | ||
| 111 | } | ||
| 112 | |||
| 113 | acpi_os_printf(" Namespace lookup failure, %s\n", | ||
| 114 | acpi_format_exception(lookup_status)); | ||
| 115 | } | ||
| 116 | |||
| 117 | /******************************************************************************* | ||
| 118 | * | ||
| 119 | * FUNCTION: acpi_ns_report_method_error | ||
| 120 | * | ||
| 121 | * PARAMETERS: module_name - Caller's module name (for error output) | ||
| 122 | * line_number - Caller's line number (for error output) | ||
| 123 | * Message - Error message to use on failure | ||
| 124 | * prefix_node - Prefix relative to the path | ||
| 125 | * Path - Path to the node (optional) | ||
| 126 | * method_status - Execution status | ||
| 127 | * | ||
| 128 | * RETURN: None | ||
| 129 | * | ||
| 130 | * DESCRIPTION: Print warning message with full pathname | ||
| 131 | * | ||
| 132 | ******************************************************************************/ | ||
| 133 | |||
| 134 | void | ||
| 135 | acpi_ns_report_method_error(const char *module_name, | ||
| 136 | u32 line_number, | ||
| 137 | const char *message, | ||
| 138 | struct acpi_namespace_node *prefix_node, | ||
| 139 | const char *path, acpi_status method_status) | ||
| 140 | { | ||
| 141 | acpi_status status; | ||
| 142 | struct acpi_namespace_node *node = prefix_node; | ||
| 143 | |||
| 144 | acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number); | ||
| 145 | |||
| 146 | if (path) { | ||
| 147 | status = | ||
| 148 | acpi_ns_get_node(prefix_node, path, ACPI_NS_NO_UPSEARCH, | ||
| 149 | &node); | ||
| 150 | if (ACPI_FAILURE(status)) { | ||
| 151 | acpi_os_printf("[Could not get node by pathname]"); | ||
| 152 | } | ||
| 153 | } | ||
| 154 | |||
| 155 | acpi_ns_print_node_pathname(node, message); | ||
| 156 | acpi_os_printf(", %s\n", acpi_format_exception(method_status)); | ||
| 157 | } | ||
| 158 | |||
| 159 | /******************************************************************************* | ||
| 160 | * | ||
| 161 | * FUNCTION: acpi_ns_print_node_pathname | 63 | * FUNCTION: acpi_ns_print_node_pathname |
| 162 | * | 64 | * |
| 163 | * PARAMETERS: Node - Object | 65 | * PARAMETERS: Node - Object |
