hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/acpi/acpica/nsnames.c
....@@ -13,9 +13,6 @@
1313 #define _COMPONENT ACPI_NAMESPACE
1414 ACPI_MODULE_NAME("nsnames")
1515
16
-/* Local Prototypes */
17
-static void acpi_ns_normalize_pathname(char *original_path);
18
-
1916 /*******************************************************************************
2017 *
2118 * FUNCTION: acpi_ns_get_external_pathname
....@@ -30,7 +27,6 @@
3027 * for error and debug statements.
3128 *
3229 ******************************************************************************/
33
-
3430 char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
3531 {
3632 char *name_buffer;
....@@ -108,8 +104,8 @@
108104 /* Just copy the ACPI name from the Node and zero terminate it */
109105
110106 node_name = acpi_ut_get_node_name(node);
111
- ACPI_MOVE_NAME(buffer->pointer, node_name);
112
- ((char *)buffer->pointer)[ACPI_NAME_SIZE] = 0;
107
+ ACPI_COPY_NAMESEG(buffer->pointer, node_name);
108
+ ((char *)buffer->pointer)[ACPI_NAMESEG_SIZE] = 0;
113109
114110 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%4.4s\n", (char *)buffer->pointer));
115111 return_ACPI_STATUS(AE_OK);
....@@ -164,7 +160,7 @@
164160 /* Build the path in the caller buffer */
165161
166162 (void)acpi_ns_build_normalized_path(node, buffer->pointer,
167
- required_size, no_trailing);
163
+ (u32)required_size, no_trailing);
168164
169165 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%X]\n",
170166 (char *)buffer->pointer, (u32) required_size));
....@@ -198,7 +194,7 @@
198194 char *full_path, u32 path_size, u8 no_trailing)
199195 {
200196 u32 length = 0, i;
201
- char name[ACPI_NAME_SIZE];
197
+ char name[ACPI_NAMESEG_SIZE];
202198 u8 do_no_trailing;
203199 char c, *left, *right;
204200 struct acpi_namespace_node *next_node;
....@@ -315,7 +311,7 @@
315311
316312 /* Build the path in the allocated buffer */
317313
318
- (void)acpi_ns_build_normalized_path(node, name_buffer, size,
314
+ (void)acpi_ns_build_normalized_path(node, name_buffer, (u32)size,
319315 no_trailing);
320316
321317 ACPI_DEBUG_PRINT_RAW((ACPI_DB_NAMES, "%s: Path \"%s\"\n",
....@@ -346,7 +342,7 @@
346342 char *full_path = NULL;
347343 char *external_path = NULL;
348344 char *prefix_path = NULL;
349
- u32 prefix_path_length = 0;
345
+ acpi_size prefix_path_length = 0;
350346
351347 /* If there is a prefix, get the pathname to it */
352348
....@@ -411,7 +407,7 @@
411407 *
412408 ******************************************************************************/
413409
414
-static void acpi_ns_normalize_pathname(char *original_path)
410
+void acpi_ns_normalize_pathname(char *original_path)
415411 {
416412 char *input_path = original_path;
417413 char *new_path_buffer;
....@@ -446,7 +442,7 @@
446442
447443 /* Do one nameseg at a time */
448444
449
- for (i = 0; (i < ACPI_NAME_SIZE) && *input_path; i++) {
445
+ for (i = 0; (i < ACPI_NAMESEG_SIZE) && *input_path; i++) {
450446 if ((i == 0) || (*input_path != '_')) { /* First char is allowed to be underscore */
451447 *new_path = *input_path;
452448 new_path++;