diff options
author | Bob Moore <robert.moore@intel.com> | 2008-04-10 11:06:40 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-22 14:29:27 -0400 |
commit | b7f9f04228eae2cf5adc2ffeb494d4970a8dd8a5 (patch) | |
tree | 729bc503991a07c0706737ba0cfdd1ab639a8252 /drivers/acpi/dispatcher | |
parent | 1d18c05825c3f2b8933a7fc7f7528881e98deb04 (diff) |
ACPICA: Cosmetic changes only, no functional changes
Lint changes, fix compiler warnings, etc.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/dispatcher')
-rw-r--r-- | drivers/acpi/dispatcher/dsmethod.c | 38 | ||||
-rw-r--r-- | drivers/acpi/dispatcher/dsobject.c | 4 | ||||
-rw-r--r-- | drivers/acpi/dispatcher/dsopcode.c | 2 | ||||
-rw-r--r-- | drivers/acpi/dispatcher/dsutils.c | 10 | ||||
-rw-r--r-- | drivers/acpi/dispatcher/dswstate.c | 6 |
5 files changed, 28 insertions, 32 deletions
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index 3db651c7f582..7a99740248c7 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c | |||
@@ -42,7 +42,6 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
45 | #include <acpi/acparser.h> | ||
46 | #include <acpi/amlcode.h> | 45 | #include <acpi/amlcode.h> |
47 | #include <acpi/acdispat.h> | 46 | #include <acpi/acdispat.h> |
48 | #include <acpi/acinterp.h> | 47 | #include <acpi/acinterp.h> |
@@ -102,7 +101,7 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state) | |||
102 | walk_state->opcode, | 101 | walk_state->opcode, |
103 | walk_state->aml_offset, | 102 | walk_state->aml_offset, |
104 | NULL); | 103 | NULL); |
105 | (void)acpi_ex_enter_interpreter(); | 104 | acpi_ex_enter_interpreter(); |
106 | } | 105 | } |
107 | #ifdef ACPI_DISASSEMBLER | 106 | #ifdef ACPI_DISASSEMBLER |
108 | if (ACPI_FAILURE(status)) { | 107 | if (ACPI_FAILURE(status)) { |
@@ -535,7 +534,6 @@ void | |||
535 | acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, | 534 | acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, |
536 | struct acpi_walk_state *walk_state) | 535 | struct acpi_walk_state *walk_state) |
537 | { | 536 | { |
538 | acpi_status status; | ||
539 | 537 | ||
540 | ACPI_FUNCTION_TRACE_PTR(ds_terminate_control_method, walk_state); | 538 | ACPI_FUNCTION_TRACE_PTR(ds_terminate_control_method, walk_state); |
541 | 539 | ||
@@ -550,29 +548,27 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, | |||
550 | /* Delete all arguments and locals */ | 548 | /* Delete all arguments and locals */ |
551 | 549 | ||
552 | acpi_ds_method_data_delete_all(walk_state); | 550 | acpi_ds_method_data_delete_all(walk_state); |
553 | } | ||
554 | 551 | ||
555 | /* | 552 | /* |
556 | * If method is serialized, release the mutex and restore the | 553 | * If method is serialized, release the mutex and restore the |
557 | * current sync level for this thread | 554 | * current sync level for this thread |
558 | */ | 555 | */ |
559 | if (method_desc->method.mutex) { | 556 | if (method_desc->method.mutex) { |
560 | 557 | ||
561 | /* Acquisition Depth handles recursive calls */ | 558 | /* Acquisition Depth handles recursive calls */ |
562 | 559 | ||
563 | method_desc->method.mutex->mutex.acquisition_depth--; | 560 | method_desc->method.mutex->mutex.acquisition_depth--; |
564 | if (!method_desc->method.mutex->mutex.acquisition_depth) { | 561 | if (!method_desc->method.mutex->mutex.acquisition_depth) { |
565 | walk_state->thread->current_sync_level = | 562 | walk_state->thread->current_sync_level = |
566 | method_desc->method.mutex->mutex. | 563 | method_desc->method.mutex->mutex. |
567 | original_sync_level; | 564 | original_sync_level; |
568 | 565 | ||
569 | acpi_os_release_mutex(method_desc->method.mutex->mutex. | 566 | acpi_os_release_mutex(method_desc->method. |
570 | os_mutex); | 567 | mutex->mutex.os_mutex); |
571 | method_desc->method.mutex->mutex.thread_id = 0; | 568 | method_desc->method.mutex->mutex.thread_id = 0; |
569 | } | ||
572 | } | 570 | } |
573 | } | ||
574 | 571 | ||
575 | if (walk_state) { | ||
576 | /* | 572 | /* |
577 | * Delete any namespace objects created anywhere within | 573 | * Delete any namespace objects created anywhere within |
578 | * the namespace by the execution of this method | 574 | * the namespace by the execution of this method |
@@ -613,7 +609,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, | |||
613 | */ | 609 | */ |
614 | if ((method_desc->method.method_flags & AML_METHOD_SERIALIZED) | 610 | if ((method_desc->method.method_flags & AML_METHOD_SERIALIZED) |
615 | && (!method_desc->method.mutex)) { | 611 | && (!method_desc->method.mutex)) { |
616 | status = acpi_ds_create_method_mutex(method_desc); | 612 | (void)acpi_ds_create_method_mutex(method_desc); |
617 | } | 613 | } |
618 | 614 | ||
619 | /* No more threads, we can free the owner_id */ | 615 | /* No more threads, we can free the owner_id */ |
diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c index 7556d919bf8b..58d4d91c8e97 100644 --- a/drivers/acpi/dispatcher/dsobject.c +++ b/drivers/acpi/dispatcher/dsobject.c | |||
@@ -157,7 +157,9 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, | |||
157 | * will remain as named references. This behavior is not described | 157 | * will remain as named references. This behavior is not described |
158 | * in the ACPI spec, but it appears to be an oversight. | 158 | * in the ACPI spec, but it appears to be an oversight. |
159 | */ | 159 | */ |
160 | obj_desc = (union acpi_operand_object *)op->common.node; | 160 | obj_desc = |
161 | ACPI_CAST_PTR(union acpi_operand_object, | ||
162 | op->common.node); | ||
161 | 163 | ||
162 | status = | 164 | status = |
163 | acpi_ex_resolve_node_to_value(ACPI_CAST_INDIRECT_PTR | 165 | acpi_ex_resolve_node_to_value(ACPI_CAST_INDIRECT_PTR |
diff --git a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c index 0c4630dc09f3..f0847eed5f3a 100644 --- a/drivers/acpi/dispatcher/dsopcode.c +++ b/drivers/acpi/dispatcher/dsopcode.c | |||
@@ -770,7 +770,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state, | |||
770 | 770 | ||
771 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n", | 771 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n", |
772 | obj_desc, | 772 | obj_desc, |
773 | ACPI_FORMAT_UINT64(obj_desc->region.address), | 773 | ACPI_FORMAT_NATIVE_UINT(obj_desc->region.address), |
774 | obj_desc->region.length)); | 774 | obj_desc->region.length)); |
775 | 775 | ||
776 | /* Now the address and length are valid for this opregion */ | 776 | /* Now the address and length are valid for this opregion */ |
diff --git a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c index 36518b4a79c2..97d01dcdc972 100644 --- a/drivers/acpi/dispatcher/dsutils.c +++ b/drivers/acpi/dispatcher/dsutils.c | |||
@@ -700,10 +700,9 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state, | |||
700 | acpi_status status = AE_OK; | 700 | acpi_status status = AE_OK; |
701 | union acpi_parse_object *arg; | 701 | union acpi_parse_object *arg; |
702 | union acpi_parse_object *arguments[ACPI_OBJ_NUM_OPERANDS]; | 702 | union acpi_parse_object *arguments[ACPI_OBJ_NUM_OPERANDS]; |
703 | u8 arg_count = 0; | 703 | u32 arg_count = 0; |
704 | u8 count = 0; | 704 | u32 index = walk_state->num_operands; |
705 | u8 index = walk_state->num_operands; | 705 | u32 i; |
706 | u8 i; | ||
707 | 706 | ||
708 | ACPI_FUNCTION_TRACE_PTR(ds_create_operands, first_arg); | 707 | ACPI_FUNCTION_TRACE_PTR(ds_create_operands, first_arg); |
709 | 708 | ||
@@ -734,14 +733,13 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state, | |||
734 | 733 | ||
735 | /* Force the filling of the operand stack in inverse order */ | 734 | /* Force the filling of the operand stack in inverse order */ |
736 | 735 | ||
737 | walk_state->operand_index = index; | 736 | walk_state->operand_index = (u8) index; |
738 | 737 | ||
739 | status = acpi_ds_create_operand(walk_state, arg, index); | 738 | status = acpi_ds_create_operand(walk_state, arg, index); |
740 | if (ACPI_FAILURE(status)) { | 739 | if (ACPI_FAILURE(status)) { |
741 | goto cleanup; | 740 | goto cleanup; |
742 | } | 741 | } |
743 | 742 | ||
744 | count++; | ||
745 | index--; | 743 | index--; |
746 | 744 | ||
747 | ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, | 745 | ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, |
diff --git a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c index 698d2e1c219e..4c402be3c74a 100644 --- a/drivers/acpi/dispatcher/dswstate.c +++ b/drivers/acpi/dispatcher/dswstate.c | |||
@@ -220,7 +220,7 @@ static acpi_status acpi_ds_result_stack_push(struct acpi_walk_state *walk_state) | |||
220 | 220 | ||
221 | /* Check for stack overflow */ | 221 | /* Check for stack overflow */ |
222 | 222 | ||
223 | if ((walk_state->result_size + ACPI_RESULTS_FRAME_OBJ_NUM) > | 223 | if (((u32) walk_state->result_size + ACPI_RESULTS_FRAME_OBJ_NUM) > |
224 | ACPI_RESULTS_OBJ_NUM_MAX) { | 224 | ACPI_RESULTS_OBJ_NUM_MAX) { |
225 | ACPI_ERROR((AE_INFO, "Result stack overflow: State=%p Num=%X", | 225 | ACPI_ERROR((AE_INFO, "Result stack overflow: State=%p Num=%X", |
226 | walk_state, walk_state->result_size)); | 226 | walk_state, walk_state->result_size)); |
@@ -400,7 +400,7 @@ void | |||
400 | acpi_ds_obj_stack_pop_and_delete(u32 pop_count, | 400 | acpi_ds_obj_stack_pop_and_delete(u32 pop_count, |
401 | struct acpi_walk_state *walk_state) | 401 | struct acpi_walk_state *walk_state) |
402 | { | 402 | { |
403 | u32 i; | 403 | acpi_native_int i; |
404 | union acpi_operand_object *obj_desc; | 404 | union acpi_operand_object *obj_desc; |
405 | 405 | ||
406 | ACPI_FUNCTION_NAME(ds_obj_stack_pop_and_delete); | 406 | ACPI_FUNCTION_NAME(ds_obj_stack_pop_and_delete); |
@@ -409,7 +409,7 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count, | |||
409 | return; | 409 | return; |
410 | } | 410 | } |
411 | 411 | ||
412 | for (i = (pop_count - 1); i >= 0; i--) { | 412 | for (i = (acpi_native_int) (pop_count - 1); i >= 0; i--) { |
413 | if (walk_state->num_operands == 0) { | 413 | if (walk_state->num_operands == 0) { |
414 | return; | 414 | return; |
415 | } | 415 | } |