acpi_ps_complete_this_op (	struct acpi_walk_state          *walk_state,	union acpi_parse_object         *op){	union acpi_parse_object         *prev;	union acpi_parse_object         *next;	const struct acpi_opcode_info   *parent_info;	union acpi_parse_object         *replacement_op = NULL;	ACPI_FUNCTION_TRACE_PTR ("ps_complete_this_op", op);	/* Check for null Op, can happen if AML code is corrupt */	if (!op) {		return_VOID;	}	/* Delete this op and the subtree below it if asked to */	if (((walk_state->parse_flags & ACPI_PARSE_TREE_MASK) != ACPI_PARSE_DELETE_TREE) ||		 (walk_state->op_info->class == AML_CLASS_ARGUMENT)) {		return_VOID;	}	/* Make sure that we only delete this subtree */	if (op->common.parent) {		/*		 * Check if we need to replace the operator and its subtree		 * with a return value op (placeholder op)		 */		parent_info = acpi_ps_get_opcode_info (op->common.parent->common.aml_opcode);		switch (parent_info->class) {		case AML_CLASS_CONTROL:			break;		case AML_CLASS_CREATE:			/*			 * These opcodes contain term_arg operands. The current			 * op must be replaced by a placeholder return op			 */			replacement_op = acpi_ps_alloc_op (AML_INT_RETURN_VALUE_OP);			if (!replacement_op) {				goto cleanup;			}			break;		case AML_CLASS_NAMED_OBJECT:			/*			 * These opcodes contain term_arg operands. The current			 * op must be replaced by a placeholder return op			 */			if ((op->common.parent->common.aml_opcode == AML_REGION_OP)      ||				(op->common.parent->common.aml_opcode == AML_DATA_REGION_OP) ||				(op->common.parent->common.aml_opcode == AML_BUFFER_OP)      ||				(op->common.parent->common.aml_opcode == AML_PACKAGE_OP)     ||				(op->common.parent->common.aml_opcode == AML_VAR_PACKAGE_OP)) {				replacement_op = acpi_ps_alloc_op (AML_INT_RETURN_VALUE_OP);				if (!replacement_op) {					goto cleanup;				}			}			if ((op->common.parent->common.aml_opcode == AML_NAME_OP) &&				(walk_state->descending_callback != acpi_ds_exec_begin_op)) {				if ((op->common.aml_opcode == AML_BUFFER_OP) ||					(op->common.aml_opcode == AML_PACKAGE_OP) ||					(op->common.aml_opcode == AML_VAR_PACKAGE_OP)) {					replacement_op = acpi_ps_alloc_op (op->common.aml_opcode);					if (!replacement_op) {						goto cleanup;					}					replacement_op->named.data = op->named.data;					replacement_op->named.length = op->named.length;				}			}			break;		default:			replacement_op = acpi_ps_alloc_op (AML_INT_RETURN_VALUE_OP);			if (!replacement_op) {				goto cleanup;			}		}		/* We must unlink this op from the parent tree */		prev = op->common.parent->common.value.arg;		if (prev == op) {			/* This op is the first in the list */			if (replacement_op) {				replacement_op->common.parent       = op->common.parent;				replacement_op->common.value.arg    = NULL;				replacement_op->common.node         = op->common.node;				op->common.parent->common.value.arg = replacement_op;				replacement_op->common.next         = op->common.next;			}			else {				op->common.parent->common.value.arg = op->common.next;			}		}		/* Search the parent list */		else while (prev) {			/* Traverse all siblings in the parent's argument list */			next = prev->common.next;			if (next == op) {				if (replacement_op) {					replacement_op->common.parent   = op->common.parent;					replacement_op->common.value.arg = NULL;					replacement_op->common.node     = op->common.node;					prev->common.next               = replacement_op;					replacement_op->common.next     = op->common.next;					next = NULL;				}				else {					prev->common.next = op->common.next;					next = NULL;				}			}			prev = next;		}	}cleanup:	/* Now we can actually delete the subtree rooted at op */	acpi_ps_delete_parse_tree (op);	return_VOID;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/44f6c01242da4e162f28d8e1216a8c7a91174605/psparse.c/clean/drivers/acpi/parser/psparse.c