Skip to content

Commit 3104fc9

Browse files
Zhe Qiaorafaeljw
authored andcommitted
ACPICA: Modify variable definition position
To prevent potential undefined risks. Link: acpica/acpica@efc4d8ab Signed-off-by: Zhe Qiao <qiaozhe@iscas.ac.cn> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent ac46f5b commit 3104fc9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/acpi/acpica/psopinfo.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static const u8 acpi_gbl_argument_count[] =
3535
const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
3636
{
3737
#ifdef ACPI_DEBUG_OUTPUT
38-
const char *opcode_name = "Unknown AML opcode";
38+
3939
#endif
4040

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

65+
const char *opcode_name = "Unknown AML opcode";
66+
6567
switch (opcode) {
6668
case AML_RAW_DATA_BYTE:
6769
opcode_name = "-Raw Data Byte-";
@@ -102,11 +104,11 @@ const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
102104
default:
103105
break;
104106
}
105-
#endif
106107

107108
/* Unknown AML opcode */
108109

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

111113
return (&acpi_gbl_aml_op_info[_UNK]);
112114
}

0 commit comments

Comments
 (0)