* If there is no object attached to the node, this node was just created and * we need to create the field object.  Otherwise, this was a lookup of an * existing node and we don't want to create the field object again.
* If there is no object attached to the node, this node was just created * and we need to create the field object.  Otherwise, this was a lookup * of an existing node and we don't want to create the field object again.
acpi_ds_create_buffer_field (	union acpi_parse_object         *op,	struct acpi_walk_state          *walk_state){	union acpi_parse_object         *arg;	struct acpi_namespace_node      *node;	acpi_status                     status;	union acpi_operand_object       *obj_desc;	union acpi_operand_object       *second_desc = NULL;	u32                             flags;	ACPI_FUNCTION_TRACE ("ds_create_buffer_field");	/* Get the name_string argument */	if (op->common.aml_opcode == AML_CREATE_FIELD_OP) {		arg = acpi_ps_get_arg (op, 3);	}	else {		/* Create Bit/Byte/Word/Dword field */		arg = acpi_ps_get_arg (op, 2);	}	if (!arg) {		return_ACPI_STATUS (AE_AML_NO_OPERAND);	}	if (walk_state->deferred_node) {		node = walk_state->deferred_node;		status = AE_OK;	}	else {		/*		 * During the load phase, we want to enter the name of the field into		 * the namespace.  During the execute phase (when we evaluate the size		 * operand), we want to lookup the name		 */		if (walk_state->parse_flags & ACPI_PARSE_EXECUTE) {			flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE;		}		else {			flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND;		}		/*		 * Enter the name_string into the namespace		 */		status = acpi_ns_lookup (walk_state->scope_info, arg->common.value.string,				 ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS1,				 flags, walk_state, &(node));		if (ACPI_FAILURE (status)) {			ACPI_REPORT_NSERROR (arg->common.value.string, status);			return_ACPI_STATUS (status);		}	}	/* We could put the returned object (Node) on the object stack for later, but	 * for now, we will put it in the "op" object that the parser uses, so we	 * can get it again at the end of this scope	 */	op->common.node = node;	/*	 * If there is no object attached to the node, this node was just created and	 * we need to create the field object.  Otherwise, this was a lookup of an	 * existing node and we don't want to create the field object again.	 */	obj_desc = acpi_ns_get_attached_object (node);	if (obj_desc) {		return_ACPI_STATUS (AE_OK);	}	/*	 * The Field definition is not fully parsed at this time.	 * (We must save the address of the AML for the buffer and index operands)	 */	/* Create the buffer field object */	obj_desc = acpi_ut_create_internal_object (ACPI_TYPE_BUFFER_FIELD);	if (!obj_desc) {		status = AE_NO_MEMORY;		goto cleanup;	}	/*	 * Remember location in AML stream of the field unit	 * opcode and operands -- since the buffer and index	 * operands must be evaluated.	 */	second_desc                 = obj_desc->common.next_object;	second_desc->extra.aml_start = op->named.data;	second_desc->extra.aml_length = op->named.length;	obj_desc->buffer_field.node = node;	/* Attach constructed field descriptors to parent node */	status = acpi_ns_attach_object (node, obj_desc, ACPI_TYPE_BUFFER_FIELD);	if (ACPI_FAILURE (status)) {		goto cleanup;	}cleanup:	/* Remove local reference to the object */	acpi_ut_remove_reference (obj_desc);	return_ACPI_STATUS (status);}