aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2009-04-22 01:13:48 -0400
committerLen Brown <len.brown@intel.com>2009-05-27 00:30:49 -0400
commitba9c3f550e5792fbce2bbd7a429bf6f6d1f45fda (patch)
treea3fce6f5acfb7112dc5baa9d86c1c8b383f4dd2d /drivers/acpi/acpica
parente4c1ebfc65c125b1289144f5815715f238367683 (diff)
ACPICA: Fix miscellaneous warnings under gcc 4+
Some possible warnings with gcc 4+, especially with extended warnings enabled 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>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r--drivers/acpi/acpica/dsobject.c5
-rw-r--r--drivers/acpi/acpica/dswstate.c4
-rw-r--r--drivers/acpi/acpica/rsxface.c8
3 files changed, 11 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c
index dab3f48f0b42..02e6caad4a76 100644
--- a/drivers/acpi/acpica/dsobject.c
+++ b/drivers/acpi/acpica/dsobject.c
@@ -734,7 +734,8 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
734 734
735 /* Local ID (0-7) is (AML opcode - base AML_LOCAL_OP) */ 735 /* Local ID (0-7) is (AML opcode - base AML_LOCAL_OP) */
736 736
737 obj_desc->reference.value = opcode - AML_LOCAL_OP; 737 obj_desc->reference.value =
738 ((u32)opcode) - AML_LOCAL_OP;
738 obj_desc->reference.class = ACPI_REFCLASS_LOCAL; 739 obj_desc->reference.class = ACPI_REFCLASS_LOCAL;
739 740
740#ifndef ACPI_NO_METHOD_EXECUTION 741#ifndef ACPI_NO_METHOD_EXECUTION
@@ -754,7 +755,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
754 755
755 /* Arg ID (0-6) is (AML opcode - base AML_ARG_OP) */ 756 /* Arg ID (0-6) is (AML opcode - base AML_ARG_OP) */
756 757
757 obj_desc->reference.value = opcode - AML_ARG_OP; 758 obj_desc->reference.value = ((u32)opcode) - AML_ARG_OP;
758 obj_desc->reference.class = ACPI_REFCLASS_ARG; 759 obj_desc->reference.class = ACPI_REFCLASS_ARG;
759 760
760#ifndef ACPI_NO_METHOD_EXECUTION 761#ifndef ACPI_NO_METHOD_EXECUTION
diff --git a/drivers/acpi/acpica/dswstate.c b/drivers/acpi/acpica/dswstate.c
index 40f92bf7dce5..e46c821cf572 100644
--- a/drivers/acpi/acpica/dswstate.c
+++ b/drivers/acpi/acpica/dswstate.c
@@ -102,7 +102,7 @@ acpi_ds_result_pop(union acpi_operand_object **object,
102 /* Return object of the top element and clean that top element result stack */ 102 /* Return object of the top element and clean that top element result stack */
103 103
104 walk_state->result_count--; 104 walk_state->result_count--;
105 index = walk_state->result_count % ACPI_RESULTS_FRAME_OBJ_NUM; 105 index = (u32)walk_state->result_count % ACPI_RESULTS_FRAME_OBJ_NUM;
106 106
107 *object = state->results.obj_desc[index]; 107 *object = state->results.obj_desc[index];
108 if (!*object) { 108 if (!*object) {
@@ -186,7 +186,7 @@ acpi_ds_result_push(union acpi_operand_object * object,
186 186
187 /* Assign the address of object to the top free element of result stack */ 187 /* Assign the address of object to the top free element of result stack */
188 188
189 index = walk_state->result_count % ACPI_RESULTS_FRAME_OBJ_NUM; 189 index = (u32)walk_state->result_count % ACPI_RESULTS_FRAME_OBJ_NUM;
190 state->results.obj_desc[index] = object; 190 state->results.obj_desc[index] = object;
191 walk_state->result_count++; 191 walk_state->result_count++;
192 192
diff --git a/drivers/acpi/acpica/rsxface.c b/drivers/acpi/acpica/rsxface.c
index 69a2aa5b5d83..395212bcd19b 100644
--- a/drivers/acpi/acpica/rsxface.c
+++ b/drivers/acpi/acpica/rsxface.c
@@ -338,13 +338,17 @@ acpi_resource_to_address64(struct acpi_resource *resource,
338 switch (resource->type) { 338 switch (resource->type) {
339 case ACPI_RESOURCE_TYPE_ADDRESS16: 339 case ACPI_RESOURCE_TYPE_ADDRESS16:
340 340
341 address16 = (struct acpi_resource_address16 *)&resource->data; 341 address16 =
342 ACPI_CAST_PTR(struct acpi_resource_address16,
343 &resource->data);
342 ACPI_COPY_ADDRESS(out, address16); 344 ACPI_COPY_ADDRESS(out, address16);
343 break; 345 break;
344 346
345 case ACPI_RESOURCE_TYPE_ADDRESS32: 347 case ACPI_RESOURCE_TYPE_ADDRESS32:
346 348
347 address32 = (struct acpi_resource_address32 *)&resource->data; 349 address32 =
350 ACPI_CAST_PTR(struct acpi_resource_address32,
351 &resource->data);
348 ACPI_COPY_ADDRESS(out, address32); 352 ACPI_COPY_ADDRESS(out, address32);
349 break; 353 break;
350 354