Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3371c19c authored by Bob Moore's avatar Bob Moore Committed by Len Brown
Browse files

ACPICA: Remove ACPI_GET_OBJECT_TYPE macro

Remove all instances of this obsolete macro, since it is now a
simple reference to ->common.type. There were about 150 invocations
of the macro across 41 files. ACPICA BZ 755.

http://www.acpica.org/bugzilla/show_bug.cgi?id=755



Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 32c9ef99
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -292,10 +292,6 @@
#define ACPI_GET_DESCRIPTOR_TYPE(d)     (((union acpi_descriptor *)(void *)(d))->common.descriptor_type)
#define ACPI_GET_DESCRIPTOR_TYPE(d)     (((union acpi_descriptor *)(void *)(d))->common.descriptor_type)
#define ACPI_SET_DESCRIPTOR_TYPE(d, t)  (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t)
#define ACPI_SET_DESCRIPTOR_TYPE(d, t)  (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t)


/* Macro to test the object type */

#define ACPI_GET_OBJECT_TYPE(d)         (((union acpi_operand_object *)(void *)(d))->common.type)

/*
/*
 * Macros for the master AML opcode table
 * Macros for the master AML opcode table
 */
 */
+1 −1
Original line number Original line Diff line number Diff line
@@ -713,6 +713,6 @@ acpi_ds_method_data_get_type(u16 opcode,


	/* Get the object type */
	/* Get the object type */


	return_VALUE(ACPI_GET_OBJECT_TYPE(object));
	return_VALUE(object->type);
}
}
#endif
#endif
+3 −3
Original line number Original line Diff line number Diff line
@@ -565,7 +565,7 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state,


	/* Re-type the object according to its argument */
	/* Re-type the object according to its argument */


	node->type = ACPI_GET_OBJECT_TYPE(obj_desc);
	node->type = obj_desc->common.type;


	/* Attach obj to node */
	/* Attach obj to node */


@@ -619,7 +619,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,


	/* Perform per-object initialization */
	/* Perform per-object initialization */


	switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
	switch (obj_desc->common.type) {
	case ACPI_TYPE_BUFFER:
	case ACPI_TYPE_BUFFER:


		/*
		/*
@@ -803,7 +803,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
	default:
	default:


		ACPI_ERROR((AE_INFO, "Unimplemented data type: %X",
		ACPI_ERROR((AE_INFO, "Unimplemented data type: %X",
			    ACPI_GET_OBJECT_TYPE(obj_desc)));
			    obj_desc->common.type));


		status = AE_AML_OPERAND_TYPE;
		status = AE_AML_OPERAND_TYPE;
		break;
		break;
+3 −5
Original line number Original line Diff line number Diff line
@@ -484,7 +484,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,


	/* Host object must be a Buffer */
	/* Host object must be a Buffer */


	if (ACPI_GET_OBJECT_TYPE(buffer_desc) != ACPI_TYPE_BUFFER) {
	if (buffer_desc->common.type != ACPI_TYPE_BUFFER) {
		ACPI_ERROR((AE_INFO,
		ACPI_ERROR((AE_INFO,
			    "Target of Create Field is not a Buffer object - %s",
			    "Target of Create Field is not a Buffer object - %s",
			    acpi_ut_get_object_type_name(buffer_desc)));
			    acpi_ut_get_object_type_name(buffer_desc)));
@@ -1365,10 +1365,8 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
			if ((ACPI_GET_DESCRIPTOR_TYPE
			if ((ACPI_GET_DESCRIPTOR_TYPE
			     (walk_state->results->results.obj_desc[0]) ==
			     (walk_state->results->results.obj_desc[0]) ==
			     ACPI_DESC_TYPE_OPERAND)
			     ACPI_DESC_TYPE_OPERAND)
			    &&
			    && ((walk_state->results->results.obj_desc[0])->
			    (ACPI_GET_OBJECT_TYPE
				common.type == ACPI_TYPE_LOCAL_REFERENCE)
			     (walk_state->results->results.obj_desc[0]) ==
			     ACPI_TYPE_LOCAL_REFERENCE)
			    && ((walk_state->results->results.obj_desc[0])->
			    && ((walk_state->results->results.obj_desc[0])->
				reference.class != ACPI_REFCLASS_INDEX)) {
				reference.class != ACPI_REFCLASS_INDEX)) {
				status =
				status =
+1 −1
Original line number Original line Diff line number Diff line
@@ -816,7 +816,7 @@ acpi_status acpi_ds_evaluate_name_path(struct acpi_walk_state *walk_state)
		goto push_result;
		goto push_result;
	}
	}


	type = ACPI_GET_OBJECT_TYPE(*operand);
	type = (*operand)->common.type;


	status = acpi_ex_resolve_to_value(operand, walk_state);
	status = acpi_ex_resolve_to_value(operand, walk_state);
	if (ACPI_FAILURE(status)) {
	if (ACPI_FAILURE(status)) {
Loading