ACPICA: Clean up exception code class checks
authorMaximilian Luz <luzmaximilian@gmail.com>
Fri, 15 Jan 2021 18:48:19 +0000 (10:48 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 18 Jan 2021 15:01:10 +0000 (16:01 +0100)
ACPICA commit 5a8390fbd4c5c60da0b6d4ba53b5ee34fda9a0cb

With the exception code class check macros fixed in the previous
commit, let us now use those to simplify exception class checks
across ACPICA.

Link: https://github.com/acpica/acpica/commit/5a8390fb
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/dbobject.c
drivers/acpi/acpica/dsdebug.c
drivers/acpi/acpica/psloop.c
drivers/acpi/acpica/psparse.c

index 4b4c530a0654f3cbf8d30746b765263531b99c15..95ab91b35f299961ea9af0af391eb6a835f7e2a1 100644 (file)
@@ -47,7 +47,7 @@ acpi_db_dump_method_info(acpi_status status, struct acpi_walk_state *walk_state)
 
        /* Ignore control codes, they are not errors */
 
-       if ((status & AE_CODE_MASK) == AE_CODE_CONTROL) {
+       if (ACPI_CNTL_EXCEPTION(status)) {
                return;
        }
 
index 63bc5f19fb82c59afe23b324d03b7355a5ea17d6..2c22e3eff5358bf91b886aed2849cb442164c12f 100644 (file)
@@ -100,7 +100,7 @@ acpi_ds_dump_method_stack(acpi_status status,
 
        /* Ignore control codes, they are not errors */
 
-       if ((status & AE_CODE_MASK) == AE_CODE_CONTROL) {
+       if (ACPI_CNTL_EXCEPTION(status)) {
                return_VOID;
        }
 
index 3cf0687b99157b4b111f32154719a7ae76e16838..1ba17cf16c41435ac975ce0c9fc035cf7c2452f6 100644 (file)
@@ -264,8 +264,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
                                                                ACPI_TO_POINTER
                                                                (TRUE));
                                if (ACPI_FAILURE(status)
-                                   && ((status & AE_CODE_MASK) !=
-                                       AE_CODE_CONTROL)) {
+                                   && !ACPI_CNTL_EXCEPTION(status)) {
                                        if (status == AE_AML_NO_RETURN_VALUE) {
                                                ACPI_EXCEPTION((AE_INFO, status,
                                                                "Invoked method did not return a value"));
index bd3caf735be38c1ac7e720edd46a0966e5bd44f3..06490a13798255f99528a9aa006c67e3a0b14a55 100644 (file)
@@ -383,7 +383,7 @@ acpi_ps_next_parse_state(struct acpi_walk_state *walk_state,
        default:
 
                status = callback_status;
-               if ((callback_status & AE_CODE_MASK) == AE_CODE_CONTROL) {
+               if (ACPI_CNTL_EXCEPTION(callback_status)) {
                        status = AE_OK;
                }
                break;