aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dispatcher/dsutils.c
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-04-18 22:49:35 -0400
committerLen Brown <len.brown@intel.com>2005-07-12 00:08:52 -0400
commit44f6c01242da4e162f28d8e1216a8c7a91174605 (patch)
tree53f724764f1bd9036dfb049a643d198125cc9edc /drivers/acpi/dispatcher/dsutils.c
parentebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (diff)
ACPICA 20050408 from Bob Moore
Fixed three cases in the interpreter where an "index" argument to an ASL function was still (internally) 32 bits instead of the required 64 bits. This was the Index argument to the Index, Mid, and Match operators. The "strupr" function is now permanently local (acpi_ut_strupr), since this is not a POSIX-defined function and not present in most kernel-level C libraries. References to the C library strupr function have been removed from the headers. Completed the deployment of static functions/prototypes. All prototypes with the static attribute have been moved from the headers to the owning C file. ACPICA 20050329 from Bob Moore An error is now generated if an attempt is made to create a Buffer Field of length zero (A CreateField with a length operand of zero.) The interpreter now issues a warning whenever executable code at the module level is detected during ACPI table load. This will give some idea of the prevalence of this type of code. Implemented support for references to named objects (other than control methods) within package objects. Enhanced package object output for the debug object. Package objects are now completely dumped, showing all elements. Enhanced miscellaneous object output for the debug object. Any object can now be written to the debug object (for example, a device object can be written, and the type of the object will be displayed.) The "static" qualifier has been added to all local functions across the core subsystem. The number of "long" lines (> 80 chars) within the source has been significantly reduced, by about 1/3. Cleaned up all header files to ensure that all CA/iASL functions are prototyped (even static functions) and the formatting is consistent. Two new header files have been added, acopcode.h and acnames.h. Removed several obsolete functions that were no longer used. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/dispatcher/dsutils.c')
-rw-r--r--drivers/acpi/dispatcher/dsutils.c41
1 files changed, 24 insertions, 17 deletions
diff --git a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c
index 462c5d83e747..9613349ac31d 100644
--- a/drivers/acpi/dispatcher/dsutils.c
+++ b/drivers/acpi/dispatcher/dsutils.c
@@ -100,7 +100,6 @@ acpi_ds_clear_implicit_return (
100 100
101 101
102#ifndef ACPI_NO_METHOD_EXECUTION 102#ifndef ACPI_NO_METHOD_EXECUTION
103
104/******************************************************************************* 103/*******************************************************************************
105 * 104 *
106 * FUNCTION: acpi_ds_do_implicit_return 105 * FUNCTION: acpi_ds_do_implicit_return
@@ -205,7 +204,7 @@ acpi_ds_is_result_used (
205 * NOTE: this is optional because the ASL language does not actually 204 * NOTE: this is optional because the ASL language does not actually
206 * support this behavior. 205 * support this behavior.
207 */ 206 */
208 acpi_ds_do_implicit_return (walk_state->result_obj, walk_state, TRUE); 207 (void) acpi_ds_do_implicit_return (walk_state->result_obj, walk_state, TRUE);
209 208
210 /* 209 /*
211 * Now determine if the parent will use the result 210 * Now determine if the parent will use the result
@@ -219,8 +218,9 @@ acpi_ds_is_result_used (
219 (op->common.parent->common.aml_opcode == AML_SCOPE_OP)) { 218 (op->common.parent->common.aml_opcode == AML_SCOPE_OP)) {
220 /* No parent, the return value cannot possibly be used */ 219 /* No parent, the return value cannot possibly be used */
221 220
222 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "At Method level, result of [%s] not used\n", 221 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
223 acpi_ps_get_opcode_name (op->common.aml_opcode))); 222 "At Method level, result of [%s] not used\n",
223 acpi_ps_get_opcode_name (op->common.aml_opcode)));
224 return_VALUE (FALSE); 224 return_VALUE (FALSE);
225 } 225 }
226 226
@@ -228,7 +228,8 @@ acpi_ds_is_result_used (
228 228
229 parent_info = acpi_ps_get_opcode_info (op->common.parent->common.aml_opcode); 229 parent_info = acpi_ps_get_opcode_info (op->common.parent->common.aml_opcode);
230 if (parent_info->class == AML_CLASS_UNKNOWN) { 230 if (parent_info->class == AML_CLASS_UNKNOWN) {
231 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown parent opcode. Op=%p\n", op)); 231 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
232 "Unknown parent opcode. Op=%p\n", op));
232 return_VALUE (FALSE); 233 return_VALUE (FALSE);
233 } 234 }
234 235
@@ -309,17 +310,19 @@ acpi_ds_is_result_used (
309 310
310 311
311result_used: 312result_used:
312 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Result of [%s] used by Parent [%s] Op=%p\n", 313 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
313 acpi_ps_get_opcode_name (op->common.aml_opcode), 314 "Result of [%s] used by Parent [%s] Op=%p\n",
314 acpi_ps_get_opcode_name (op->common.parent->common.aml_opcode), op)); 315 acpi_ps_get_opcode_name (op->common.aml_opcode),
316 acpi_ps_get_opcode_name (op->common.parent->common.aml_opcode), op));
315 317
316 return_VALUE (TRUE); 318 return_VALUE (TRUE);
317 319
318 320
319result_not_used: 321result_not_used:
320 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Result of [%s] not used by Parent [%s] Op=%p\n", 322 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
321 acpi_ps_get_opcode_name (op->common.aml_opcode), 323 "Result of [%s] not used by Parent [%s] Op=%p\n",
322 acpi_ps_get_opcode_name (op->common.parent->common.aml_opcode), op)); 324 acpi_ps_get_opcode_name (op->common.aml_opcode),
325 acpi_ps_get_opcode_name (op->common.parent->common.aml_opcode), op));
323 326
324 return_VALUE (FALSE); 327 return_VALUE (FALSE);
325} 328}
@@ -522,7 +525,8 @@ acpi_ds_create_operand (
522 if ((walk_state->deferred_node) && 525 if ((walk_state->deferred_node) &&
523 (walk_state->deferred_node->type == ACPI_TYPE_BUFFER_FIELD) && 526 (walk_state->deferred_node->type == ACPI_TYPE_BUFFER_FIELD) &&
524 (arg_index != 0)) { 527 (arg_index != 0)) {
525 obj_desc = ACPI_CAST_PTR (union acpi_operand_object, walk_state->deferred_node); 528 obj_desc = ACPI_CAST_PTR (
529 union acpi_operand_object, walk_state->deferred_node);
526 status = AE_OK; 530 status = AE_OK;
527 } 531 }
528 else /* All other opcodes */ { 532 else /* All other opcodes */ {
@@ -565,7 +569,8 @@ acpi_ds_create_operand (
565 * indicate this to the interpreter, set the 569 * indicate this to the interpreter, set the
566 * object to the root 570 * object to the root
567 */ 571 */
568 obj_desc = ACPI_CAST_PTR (union acpi_operand_object, acpi_gbl_root_node); 572 obj_desc = ACPI_CAST_PTR (
573 union acpi_operand_object, acpi_gbl_root_node);
569 status = AE_OK; 574 status = AE_OK;
570 } 575 }
571 else { 576 else {
@@ -612,7 +617,8 @@ acpi_ds_create_operand (
612 */ 617 */
613 opcode = AML_ZERO_OP; /* Has no arguments! */ 618 opcode = AML_ZERO_OP; /* Has no arguments! */
614 619
615 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Null namepath: Arg=%p\n", arg)); 620 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
621 "Null namepath: Arg=%p\n", arg));
616 } 622 }
617 else { 623 else {
618 opcode = arg->common.aml_opcode; 624 opcode = arg->common.aml_opcode;
@@ -642,7 +648,8 @@ acpi_ds_create_operand (
642 * Only error is underflow, and this indicates 648 * Only error is underflow, and this indicates
643 * a missing or null operand! 649 * a missing or null operand!
644 */ 650 */
645 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Missing or null operand, %s\n", 651 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
652 "Missing or null operand, %s\n",
646 acpi_format_exception (status))); 653 acpi_format_exception (status)));
647 return_ACPI_STATUS (status); 654 return_ACPI_STATUS (status);
648 } 655 }
@@ -657,8 +664,8 @@ acpi_ds_create_operand (
657 664
658 /* Initialize the new object */ 665 /* Initialize the new object */
659 666
660 status = acpi_ds_init_object_from_op (walk_state, arg, 667 status = acpi_ds_init_object_from_op (
661 opcode, &obj_desc); 668 walk_state, arg, opcode, &obj_desc);
662 if (ACPI_FAILURE (status)) { 669 if (ACPI_FAILURE (status)) {
663 acpi_ut_delete_object_desc (obj_desc); 670 acpi_ut_delete_object_desc (obj_desc);
664 return_ACPI_STATUS (status); 671 return_ACPI_STATUS (status);