diff options
Diffstat (limited to 'drivers/acpi/namespace/nsutils.c')
-rw-r--r-- | drivers/acpi/namespace/nsutils.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c index 64c039843ed2..5b5619c54594 100644 --- a/drivers/acpi/namespace/nsutils.c +++ b/drivers/acpi/namespace/nsutils.c | |||
@@ -365,7 +365,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) | |||
365 | char *internal_name = info->internal_name; | 365 | char *internal_name = info->internal_name; |
366 | char *external_name = info->next_external_char; | 366 | char *external_name = info->next_external_char; |
367 | char *result = NULL; | 367 | char *result = NULL; |
368 | acpi_native_uint i; | 368 | u32 i; |
369 | 369 | ||
370 | ACPI_FUNCTION_TRACE(ns_build_internal_name); | 370 | ACPI_FUNCTION_TRACE(ns_build_internal_name); |
371 | 371 | ||
@@ -400,12 +400,11 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) | |||
400 | result = &internal_name[i]; | 400 | result = &internal_name[i]; |
401 | } else if (num_segments == 2) { | 401 | } else if (num_segments == 2) { |
402 | internal_name[i] = AML_DUAL_NAME_PREFIX; | 402 | internal_name[i] = AML_DUAL_NAME_PREFIX; |
403 | result = &internal_name[(acpi_native_uint) (i + 1)]; | 403 | result = &internal_name[(acpi_size) i + 1]; |
404 | } else { | 404 | } else { |
405 | internal_name[i] = AML_MULTI_NAME_PREFIX_OP; | 405 | internal_name[i] = AML_MULTI_NAME_PREFIX_OP; |
406 | internal_name[(acpi_native_uint) (i + 1)] = | 406 | internal_name[(acpi_size) i + 1] = (char)num_segments; |
407 | (char)num_segments; | 407 | result = &internal_name[(acpi_size) i + 2]; |
408 | result = &internal_name[(acpi_native_uint) (i + 2)]; | ||
409 | } | 408 | } |
410 | } | 409 | } |
411 | 410 | ||
@@ -531,12 +530,12 @@ acpi_ns_externalize_name(u32 internal_name_length, | |||
531 | char *internal_name, | 530 | char *internal_name, |
532 | u32 * converted_name_length, char **converted_name) | 531 | u32 * converted_name_length, char **converted_name) |
533 | { | 532 | { |
534 | acpi_native_uint names_index = 0; | 533 | u32 names_index = 0; |
535 | acpi_native_uint num_segments = 0; | 534 | u32 num_segments = 0; |
536 | acpi_native_uint required_length; | 535 | u32 required_length; |
537 | acpi_native_uint prefix_length = 0; | 536 | u32 prefix_length = 0; |
538 | acpi_native_uint i = 0; | 537 | u32 i = 0; |
539 | acpi_native_uint j = 0; | 538 | u32 j = 0; |
540 | 539 | ||
541 | ACPI_FUNCTION_TRACE(ns_externalize_name); | 540 | ACPI_FUNCTION_TRACE(ns_externalize_name); |
542 | 541 | ||
@@ -582,9 +581,8 @@ acpi_ns_externalize_name(u32 internal_name_length, | |||
582 | /* <count> 4-byte names */ | 581 | /* <count> 4-byte names */ |
583 | 582 | ||
584 | names_index = prefix_length + 2; | 583 | names_index = prefix_length + 2; |
585 | num_segments = (acpi_native_uint) (u8) | 584 | num_segments = (u8) |
586 | internal_name[(acpi_native_uint) | 585 | internal_name[(acpi_size) prefix_length + 1]; |
587 | (prefix_length + 1)]; | ||
588 | break; | 586 | break; |
589 | 587 | ||
590 | case AML_DUAL_NAME_PREFIX: | 588 | case AML_DUAL_NAME_PREFIX: |