Commit 1d1ea1b7 authored by Chao Guan's avatar Chao Guan Committed by Rafael J. Wysocki
Browse files

ACPICA: Standardize all switch() blocks

After many years, different formatting for switch() has crept in.
This change makes every switch block identical. Chao Guan.
ACPICA bugzilla 997.

References: https://bugs.acpica.org/show_bug.cgi?id=997


Signed-off-by: default avatarChao Guan <chao.guan@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b6872ff9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -78,7 +78,6 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,

	switch (op->common.aml_opcode) {
	case AML_WHILE_OP:

		/*
		 * If this is an additional iteration of a while loop, continue.
		 * There is no need to allocate a new control state.
@@ -99,7 +98,6 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
		/*lint -fallthrough */

	case AML_IF_OP:

		/*
		 * IF/WHILE: Create a new control state to manage these
		 * constructs. We need to manage these as a stack, in order
@@ -142,6 +140,7 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
		break;

	default:

		break;
	}

@@ -344,6 +343,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
	case AML_NOOP_OP:

		/* Just do nothing! */

		break;

	case AML_BREAK_POINT_OP:
+4 −0
Original line number Diff line number Diff line
@@ -563,21 +563,25 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
	 */
	switch (walk_state->opcode) {
	case AML_FIELD_OP:

		arg = acpi_ps_get_arg(op, 2);
		type = ACPI_TYPE_LOCAL_REGION_FIELD;
		break;

	case AML_BANK_FIELD_OP:

		arg = acpi_ps_get_arg(op, 4);
		type = ACPI_TYPE_LOCAL_BANK_FIELD;
		break;

	case AML_INDEX_FIELD_OP:

		arg = acpi_ps_get_arg(op, 3);
		type = ACPI_TYPE_LOCAL_INDEX_FIELD;
		break;

	default:

		return_ACPI_STATUS(AE_BAD_PARAMETER);
	}

+1 −0
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
		break;

	default:

		break;
	}

+1 −1
Original line number Diff line number Diff line
@@ -285,6 +285,7 @@ acpi_ds_method_data_get_node(u8 type,
		break;

	default:

		ACPI_ERROR((AE_INFO, "Type %u is invalid", type));
		return_ACPI_STATUS(AE_TYPE);
	}
@@ -428,7 +429,6 @@ acpi_ds_method_data_get_value(u8 type,
				return_ACPI_STATUS(AE_AML_UNINITIALIZED_ARG);

			case ACPI_REFCLASS_LOCAL:

				/*
				 * No error message for this case, will be trapped again later to
				 * detect and ignore cases of Store(local_x,local_x)
+1 −2
Original line number Diff line number Diff line
@@ -648,7 +648,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,

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

		/*
		 * Defer evaluation of Buffer term_arg operand
		 */
@@ -660,7 +659,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
		break;

	case ACPI_TYPE_PACKAGE:

		/*
		 * Defer evaluation of Package term_arg operand
		 */
@@ -741,6 +739,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
			break;

		default:

			ACPI_ERROR((AE_INFO, "Unknown Integer type 0x%X",
				    op_info->type));
			status = AE_AML_OPERAND_TYPE;
Loading