aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/utilities
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-06-10 13:42:13 +0800
committerAndi Kleen <andi@basil.nowhere.org>2008-07-16 23:27:03 +0200
commit67a119f990063f5662574f6d6414fe9bc5ece86a (patch)
tree96be8ffbbe56a0a2a85dba14b8c81f153ac218f2 /drivers/acpi/utilities
parent11f2a61ab418305167f9a3f3a31a50449222f64b (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.c4
-rw-r--r--drivers/acpi/utilities/utdebug.c28
-rw-r--r--drivers/acpi/utilities/utdelete.c2
-rw-r--r--drivers/acpi/utilities/uteval.c4
-rw-r--r--drivers/acpi/utilities/utmisc.c14
-rw-r--r--drivers/acpi/utilities/utobject.c4
6 files changed, 31 insertions, 25 deletions
diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c
index 655c290aca7..53499ac9098 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,
acpi_status status = AE_OK;
union acpi_operand_object *package_object;
union acpi_operand_object **package_elements;
- acpi_native_uint i;
+ u32 i;
ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage);
@@ -599,7 +599,7 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object,
/* Truncate package and delete it */
- package_object->package.count = (u32) i;
+ package_object->package.count = i;
package_elements[i] = NULL;
acpi_ut_remove_reference(package_object);
return_ACPI_STATUS(status);
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c
index f938f465efa..3919fe599f9 100644
--- a/drivers/acpi/utilities/utdebug.c
+++ b/drivers/acpi/utilities/utdebug.c
@@ -519,8 +519,8 @@ acpi_ut_ptr_exit(u32 line_number,
void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
{
- acpi_native_uint i = 0;
- acpi_native_uint j;
+ u32 i = 0;
+ u32 j;
u32 temp32;
u8 buf_char;
@@ -539,7 +539,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
/* Print current offset */
- acpi_os_printf("%6.4X: ", (u32) i);
+ acpi_os_printf("%6.4X: ", i);
/* Print 16 hex chars */
@@ -549,7 +549,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
/* Dump fill spaces */
acpi_os_printf("%*s", ((display * 2) + 1), " ");
- j += (acpi_native_uint) display;
+ j += display;
continue;
}
@@ -557,32 +557,38 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
case DB_BYTE_DISPLAY:
default: /* Default is BYTE display */
- acpi_os_printf("%02X ", buffer[i + j]);
+ acpi_os_printf("%02X ",
+ buffer[(acpi_size) i + j]);
break;
case DB_WORD_DISPLAY:
- ACPI_MOVE_16_TO_32(&temp32, &buffer[i + j]);
+ ACPI_MOVE_16_TO_32(&temp32,
+ &buffer[(acpi_size) i + j]);
acpi_os_printf("%04X ", temp32);
break;
case DB_DWORD_DISPLAY:
- ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j]);
+ ACPI_MOVE_32_TO_32(&temp32,
+ &buffer[(acpi_size) i + j]);
acpi_os_printf("%08X ", temp32);
break;
case DB_QWORD_DISPLAY:
- ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j]);
+ ACPI_MOVE_32_TO_32(&temp32,
+ &buffer[(acpi_size) i + j]);
acpi_os_printf("%08X", temp32);
- ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j + 4]);
+ ACPI_MOVE_32_TO_32(&temp32,
+ &buffer[(acpi_size) i + j +
+ 4]);
acpi_os_printf("%08X ", temp32);
break;
}
- j += (acpi_native_uint) display;
+ j += display;
}
/*
@@ -596,7 +602,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
return;
}
- buf_char = buffer[i + j];
+ buf_char = buffer[(acpi_size) i + j];
if (ACPI_IS_PRINT(buf_char)) {
acpi_os_printf("%c", buf_char);
} else {
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c
index 1fbc35139e8..c5c791a575c 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)
union acpi_generic_state *state_list = NULL;
union acpi_operand_object *next_object = NULL;
union acpi_generic_state *state;
- acpi_native_uint i;
+ u32 i;
ACPI_FUNCTION_TRACE_PTR(ut_update_object_reference, object);
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c
index 7f1f6341242..352747e49c7 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)
acpi_status status;
union acpi_operand_object *string_desc;
union acpi_operand_object *return_desc;
- acpi_native_uint i;
+ u32 i;
ACPI_FUNCTION_TRACE(ut_osi_implementation);
@@ -513,7 +513,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node,
u32 count;
u32 size;
struct acpi_compatible_id_list *cid_list;
- acpi_native_uint i;
+ u32 i;
ACPI_FUNCTION_TRACE(ut_execute_CID);
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c
index 47354d9b0e5..6175ca5d73b 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)
acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)
{
- acpi_native_uint i;
- acpi_native_uint j;
- acpi_native_uint k;
+ u32 i;
+ u32 j;
+ u32 k;
acpi_status status;
ACPI_FUNCTION_TRACE(ut_allocate_owner_id);
@@ -269,7 +269,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr)
{
acpi_owner_id owner_id = *owner_id_ptr;
acpi_status status;
- acpi_native_uint index;
+ u32 index;
u32 bit;
ACPI_FUNCTION_TRACE_U32(ut_release_owner_id, owner_id);
@@ -589,7 +589,7 @@ acpi_ut_display_init_pathname(u8 type,
*
******************************************************************************/
-u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position)
+u8 acpi_ut_valid_acpi_char(char character, u32 position)
{
if (!((character >= 'A' && character <= 'Z') ||
@@ -624,7 +624,7 @@ u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position)
u8 acpi_ut_valid_acpi_name(u32 name)
{
- acpi_native_uint i;
+ u32 i;
ACPI_FUNCTION_ENTRY();
@@ -653,7 +653,7 @@ u8 acpi_ut_valid_acpi_name(u32 name)
acpi_name acpi_ut_repair_name(char *name)
{
- acpi_native_uint i;
+ u32 i;
char new_name[ACPI_NAME_SIZE];
for (i = 0; i < ACPI_NAME_SIZE; i++) {
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c
index e68466de804..ede6a80837d 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)
* Create the element array. Count+1 allows the array to be null
* terminated.
*/
- package_elements = ACPI_ALLOCATE_ZEROED((acpi_size)
- (count + 1) * sizeof(void *));
+ package_elements = ACPI_ALLOCATE_ZEROED(((acpi_size) count +
+ 1) * sizeof(void *));
if (!package_elements) {
acpi_ut_remove_reference(package_desc);
return_PTR(NULL);