]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ACPICA: Change the compilation conditions
authorZhe Qiao <qiaozhe@iscas.ac.cn>
Fri, 12 Sep 2025 19:54:07 +0000 (21:54 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Sep 2025 10:20:12 +0000 (12:20 +0200)
To prevent the risk of undefined variables.

Link: https://github.com/acpica/acpica/commit/9f86d4c9
Signed-off-by: Zhe Qiao <qiaozhe@iscas.ac.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/psopinfo.c

index ca867d9407f9c07ea591602e41f41583e591dd06..532ea307a675489e8a659185720ca9b98927a491 100644 (file)
@@ -34,6 +34,9 @@ static const u8 acpi_gbl_argument_count[] =
 
 const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
 {
+#if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT
+       const char *opcode_name = "Unknown AML opcode";
+#endif
 
        ACPI_FUNCTION_NAME(ps_get_opcode_info);
 
@@ -59,8 +62,6 @@ 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-";