diff options
author | Bob Moore <robert.moore@intel.com> | 2008-06-10 01:42:13 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2008-07-16 17:27:03 -0400 |
commit | 67a119f990063f5662574f6d6414fe9bc5ece86a (patch) | |
tree | 96be8ffbbe56a0a2a85dba14b8c81f153ac218f2 /drivers/acpi/utilities | |
parent | 11f2a61ab418305167f9a3f3a31a50449222f64b (diff) |
ACPICA: Eliminate acpi_native_uint type v2
No longer needed; replaced mostly with u32, but also acpi_size
where a type that changes 32/64 bit on 32/64-bit platforms is
required.
v2: Fix a cast of a 32-bit int to a pointer in ACPI to avoid a compiler warning.
from David Howells
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'drivers/acpi/utilities')
-rw-r--r-- | drivers/acpi/utilities/utcopy.c | 4 | ||||
-rw-r--r-- | drivers/acpi/utilities/utdebug.c | 28 | ||||
-rw-r--r-- | drivers/acpi/utilities/utdelete.c | 2 | ||||
-rw-r--r-- | drivers/acpi/utilities/uteval.c | 4 | ||||
-rw-r--r-- | drivers/acpi/utilities/utmisc.c | 14 | ||||
-rw-r--r-- | drivers/acpi/utilities/utobject.c | 4 |
6 files changed, 31 insertions, 25 deletions
diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index 655c290aca7b..53499ac90988 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c | |||
@@ -572,7 +572,7 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object, | |||
572 | acpi_status status = AE_OK; | 572 | acpi_status status = AE_OK; |
573 | union acpi_operand_object *package_object; | 573 | union acpi_operand_object *package_object; |
574 | union acpi_operand_object **package_elements; | 574 | union acpi_operand_object **package_elements; |
575 | acpi_native_uint i; | 575 | u32 i; |
576 | 576 | ||
577 | ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage); | 577 | ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage); |
578 | 578 | ||
@@ -599,7 +599,7 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object, | |||
599 | 599 | ||
600 | /* Truncate package and delete it */ | 600 | /* Truncate package and delete it */ |
601 | 601 | ||
602 | package_object->package.count = (u32) i; | 602 | package_object->package.count = i; |
603 | package_elements[i] = NULL; | 603 | package_elements[i] = NULL; |
604 | acpi_ut_remove_reference(package_object); | 604 | acpi_ut_remove_reference(package_object); |
605 | return_ACPI_STATUS(status); | 605 | return_ACPI_STATUS(status); |
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c index f938f465efa4..3919fe599f94 100644 --- a/drivers/acpi/utilities/utdebug.c +++ b/drivers/acpi/utilities/utdebug.c | |||
@@ -519,8 +519,8 @@ acpi_ut_ptr_exit(u32 line_number, | |||
519 | 519 | ||
520 | void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) | 520 | void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) |
521 | { | 521 | { |
522 | acpi_native_uint i = 0; | 522 | u32 i = 0; |
523 | acpi_native_uint j; | 523 | u32 j; |
524 | u32 temp32; | 524 | u32 temp32; |
525 | u8 buf_char; | 525 | u8 buf_char; |
526 | 526 | ||
@@ -539,7 +539,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) | |||
539 | 539 | ||
540 | /* Print current offset */ | 540 | /* Print current offset */ |
541 | 541 | ||
542 | acpi_os_printf("%6.4X: ", (u32) i); | 542 | acpi_os_printf("%6.4X: ", i); |
543 | 543 | ||
544 | /* Print 16 hex chars */ | 544 | /* Print 16 hex chars */ |
545 | 545 | ||
@@ -549,7 +549,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) | |||
549 | /* Dump fill spaces */ | 549 | /* Dump fill spaces */ |
550 | 550 | ||
551 | acpi_os_printf("%*s", ((display * 2) + 1), " "); | 551 | acpi_os_printf("%*s", ((display * 2) + 1), " "); |
552 | j += (acpi_native_uint) display; | 552 | j += display; |
553 | continue; | 553 | continue; |
554 | } | 554 | } |
555 | 555 | ||
@@ -557,32 +557,38 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) | |||
557 | case DB_BYTE_DISPLAY: | 557 | case DB_BYTE_DISPLAY: |
558 | default: /* Default is BYTE display */ | 558 | default: /* Default is BYTE display */ |
559 | 559 | ||
560 | acpi_os_printf("%02X ", buffer[i + j]); | 560 | acpi_os_printf("%02X ", |
561 | buffer[(acpi_size) i + j]); | ||
561 | break; | 562 | break; |
562 | 563 | ||
563 | case DB_WORD_DISPLAY: | 564 | case DB_WORD_DISPLAY: |
564 | 565 | ||
565 | ACPI_MOVE_16_TO_32(&temp32, &buffer[i + j]); | 566 | ACPI_MOVE_16_TO_32(&temp32, |
567 | &buffer[(acpi_size) i + j]); | ||
566 | acpi_os_printf("%04X ", temp32); | 568 | acpi_os_printf("%04X ", temp32); |
567 | break; | 569 | break; |
568 | 570 | ||
569 | case DB_DWORD_DISPLAY: | 571 | case DB_DWORD_DISPLAY: |
570 | 572 | ||
571 | ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j]); | 573 | ACPI_MOVE_32_TO_32(&temp32, |
574 | &buffer[(acpi_size) i + j]); | ||
572 | acpi_os_printf("%08X ", temp32); | 575 | acpi_os_printf("%08X ", temp32); |
573 | break; | 576 | break; |
574 | 577 | ||
575 | case DB_QWORD_DISPLAY: | 578 | case DB_QWORD_DISPLAY: |
576 | 579 | ||
577 | ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j]); | 580 | ACPI_MOVE_32_TO_32(&temp32, |
581 | &buffer[(acpi_size) i + j]); | ||
578 | acpi_os_printf("%08X", temp32); | 582 | acpi_os_printf("%08X", temp32); |
579 | 583 | ||
580 | ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j + 4]); | 584 | ACPI_MOVE_32_TO_32(&temp32, |
585 | &buffer[(acpi_size) i + j + | ||
586 | 4]); | ||
581 | acpi_os_printf("%08X ", temp32); | 587 | acpi_os_printf("%08X ", temp32); |
582 | break; | 588 | break; |
583 | } | 589 | } |
584 | 590 | ||
585 | j += (acpi_native_uint) display; | 591 | j += display; |
586 | } | 592 | } |
587 | 593 | ||
588 | /* | 594 | /* |
@@ -596,7 +602,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) | |||
596 | return; | 602 | return; |
597 | } | 603 | } |
598 | 604 | ||
599 | buf_char = buffer[i + j]; | 605 | buf_char = buffer[(acpi_size) i + j]; |
600 | if (ACPI_IS_PRINT(buf_char)) { | 606 | if (ACPI_IS_PRINT(buf_char)) { |
601 | acpi_os_printf("%c", buf_char); | 607 | acpi_os_printf("%c", buf_char); |
602 | } else { | 608 | } else { |
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c index 1fbc35139e84..c5c791a575c9 100644 --- a/drivers/acpi/utilities/utdelete.c +++ b/drivers/acpi/utilities/utdelete.c | |||
@@ -442,7 +442,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) | |||
442 | union acpi_generic_state *state_list = NULL; | 442 | union acpi_generic_state *state_list = NULL; |
443 | union acpi_operand_object *next_object = NULL; | 443 | union acpi_operand_object *next_object = NULL; |
444 | union acpi_generic_state *state; | 444 | union acpi_generic_state *state; |
445 | acpi_native_uint i; | 445 | u32 i; |
446 | 446 | ||
447 | ACPI_FUNCTION_TRACE_PTR(ut_update_object_reference, object); | 447 | ACPI_FUNCTION_TRACE_PTR(ut_update_object_reference, object); |
448 | 448 | ||
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c index 7f1f6341242d..352747e49c7a 100644 --- a/drivers/acpi/utilities/uteval.c +++ b/drivers/acpi/utilities/uteval.c | |||
@@ -97,7 +97,7 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) | |||
97 | acpi_status status; | 97 | acpi_status status; |
98 | union acpi_operand_object *string_desc; | 98 | union acpi_operand_object *string_desc; |
99 | union acpi_operand_object *return_desc; | 99 | union acpi_operand_object *return_desc; |
100 | acpi_native_uint i; | 100 | u32 i; |
101 | 101 | ||
102 | ACPI_FUNCTION_TRACE(ut_osi_implementation); | 102 | ACPI_FUNCTION_TRACE(ut_osi_implementation); |
103 | 103 | ||
@@ -513,7 +513,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, | |||
513 | u32 count; | 513 | u32 count; |
514 | u32 size; | 514 | u32 size; |
515 | struct acpi_compatible_id_list *cid_list; | 515 | struct acpi_compatible_id_list *cid_list; |
516 | acpi_native_uint i; | 516 | u32 i; |
517 | 517 | ||
518 | ACPI_FUNCTION_TRACE(ut_execute_CID); | 518 | ACPI_FUNCTION_TRACE(ut_execute_CID); |
519 | 519 | ||
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index 47354d9b0e56..6175ca5d73bf 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c | |||
@@ -161,9 +161,9 @@ u8 acpi_ut_is_aml_table(struct acpi_table_header *table) | |||
161 | 161 | ||
162 | acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) | 162 | acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) |
163 | { | 163 | { |
164 | acpi_native_uint i; | 164 | u32 i; |
165 | acpi_native_uint j; | 165 | u32 j; |
166 | acpi_native_uint k; | 166 | u32 k; |
167 | acpi_status status; | 167 | acpi_status status; |
168 | 168 | ||
169 | ACPI_FUNCTION_TRACE(ut_allocate_owner_id); | 169 | ACPI_FUNCTION_TRACE(ut_allocate_owner_id); |
@@ -269,7 +269,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) | |||
269 | { | 269 | { |
270 | acpi_owner_id owner_id = *owner_id_ptr; | 270 | acpi_owner_id owner_id = *owner_id_ptr; |
271 | acpi_status status; | 271 | acpi_status status; |
272 | acpi_native_uint index; | 272 | u32 index; |
273 | u32 bit; | 273 | u32 bit; |
274 | 274 | ||
275 | ACPI_FUNCTION_TRACE_U32(ut_release_owner_id, owner_id); | 275 | ACPI_FUNCTION_TRACE_U32(ut_release_owner_id, owner_id); |
@@ -589,7 +589,7 @@ acpi_ut_display_init_pathname(u8 type, | |||
589 | * | 589 | * |
590 | ******************************************************************************/ | 590 | ******************************************************************************/ |
591 | 591 | ||
592 | u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position) | 592 | u8 acpi_ut_valid_acpi_char(char character, u32 position) |
593 | { | 593 | { |
594 | 594 | ||
595 | if (!((character >= 'A' && character <= 'Z') || | 595 | if (!((character >= 'A' && character <= 'Z') || |
@@ -624,7 +624,7 @@ u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position) | |||
624 | 624 | ||
625 | u8 acpi_ut_valid_acpi_name(u32 name) | 625 | u8 acpi_ut_valid_acpi_name(u32 name) |
626 | { | 626 | { |
627 | acpi_native_uint i; | 627 | u32 i; |
628 | 628 | ||
629 | ACPI_FUNCTION_ENTRY(); | 629 | ACPI_FUNCTION_ENTRY(); |
630 | 630 | ||
@@ -653,7 +653,7 @@ u8 acpi_ut_valid_acpi_name(u32 name) | |||
653 | 653 | ||
654 | acpi_name acpi_ut_repair_name(char *name) | 654 | acpi_name acpi_ut_repair_name(char *name) |
655 | { | 655 | { |
656 | acpi_native_uint i; | 656 | u32 i; |
657 | char new_name[ACPI_NAME_SIZE]; | 657 | char new_name[ACPI_NAME_SIZE]; |
658 | 658 | ||
659 | for (i = 0; i < ACPI_NAME_SIZE; i++) { | 659 | for (i = 0; i < ACPI_NAME_SIZE; i++) { |
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index e68466de8044..ede6a80837df 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c | |||
@@ -175,8 +175,8 @@ union acpi_operand_object *acpi_ut_create_package_object(u32 count) | |||
175 | * Create the element array. Count+1 allows the array to be null | 175 | * Create the element array. Count+1 allows the array to be null |
176 | * terminated. | 176 | * terminated. |
177 | */ | 177 | */ |
178 | package_elements = ACPI_ALLOCATE_ZEROED((acpi_size) | 178 | package_elements = ACPI_ALLOCATE_ZEROED(((acpi_size) count + |
179 | (count + 1) * sizeof(void *)); | 179 | 1) * sizeof(void *)); |
180 | if (!package_elements) { | 180 | if (!package_elements) { |
181 | acpi_ut_remove_reference(package_desc); | 181 | acpi_ut_remove_reference(package_desc); |
182 | return_PTR(NULL); | 182 | return_PTR(NULL); |