Commit 3104fc98 authored by Zhe Qiao's avatar Zhe Qiao Committed by Rafael J. Wysocki
Browse files

ACPICA: Modify variable definition position

To prevent potential undefined risks.

Link: https://github.com/acpica/acpica/commit/efc4d8ab


Signed-off-by: default avatarZhe Qiao <qiaozhe@iscas.ac.cn>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent ac46f5b6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ static const u8 acpi_gbl_argument_count[] =
const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
{
#ifdef ACPI_DEBUG_OUTPUT
	const char *opcode_name = "Unknown AML opcode";

#endif

	ACPI_FUNCTION_NAME(ps_get_opcode_info);
@@ -62,6 +62,8 @@ const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
#if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT
#include "asldefine.h"

	const char *opcode_name = "Unknown AML opcode";

	switch (opcode) {
	case AML_RAW_DATA_BYTE:
		opcode_name = "-Raw Data Byte-";
@@ -102,11 +104,11 @@ const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
	default:
		break;
	}
#endif

	/* Unknown AML opcode */

	ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%4.4X]\n", opcode_name, opcode));
#endif

	return (&acpi_gbl_aml_op_info[_UNK]);
}