All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erik Kaneda <erik.kaneda@intel.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Cc: Maximilian Luz <luzmaximilian@gmail.com>,
	Bob Moore <robert.moore@intel.com>,
	Erik Kaneda <erik.kaneda@intel.com>
Subject: [PATCH v2 2/9] ACPICA: Clean up exception code class checks
Date: Thu, 21 Jan 2021 16:23:50 -0800	[thread overview]
Message-ID: <20210122002357.370836-3-erik.kaneda@intel.com> (raw)
In-Reply-To: <20210122002357.370836-1-erik.kaneda@intel.com>

From: Maximilian Luz <luzmaximilian@gmail.com>

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>
---
 drivers/acpi/acpica/dbobject.c | 2 +-
 drivers/acpi/acpica/dsdebug.c  | 2 +-
 drivers/acpi/acpica/psloop.c   | 3 +--
 drivers/acpi/acpica/psparse.c  | 2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/acpica/dbobject.c b/drivers/acpi/acpica/dbobject.c
index 4b4c530a0654..95ab91b35f29 100644
--- a/drivers/acpi/acpica/dbobject.c
+++ b/drivers/acpi/acpica/dbobject.c
@@ -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;
 	}
 
diff --git a/drivers/acpi/acpica/dsdebug.c b/drivers/acpi/acpica/dsdebug.c
index 63bc5f19fb82..2c22e3eff535 100644
--- a/drivers/acpi/acpica/dsdebug.c
+++ b/drivers/acpi/acpica/dsdebug.c
@@ -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;
 	}
 
diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c
index 3cf0687b9915..1ba17cf16c41 100644
--- a/drivers/acpi/acpica/psloop.c
+++ b/drivers/acpi/acpica/psloop.c
@@ -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"));
diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c
index bd3caf735be3..06490a137982 100644
--- a/drivers/acpi/acpica/psparse.c
+++ b/drivers/acpi/acpica/psparse.c
@@ -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;
-- 
2.29.2


  parent reply	other threads:[~2021-01-22  0:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22  0:23 [PATCH v2 0/9] ACPICA release 20201217 and 20210105 Erik Kaneda
2021-01-22  0:23 ` [PATCH v2 1/9] ACPICA: Fix exception code class checks Erik Kaneda
2021-01-22  0:23 ` Erik Kaneda [this message]
2021-01-22  0:23 ` [PATCH v2 3/9] ACPICA: ACPICA: fix -Wfallthrough Erik Kaneda
2021-01-23 15:21   ` [v2,3/9] " Guenter Roeck
2021-01-23 15:25     ` Guenter Roeck
2021-01-23 20:11       ` Rafael J. Wysocki
2021-01-22  0:23 ` [PATCH v2 4/9] ACPICA: add type casts for string functions Erik Kaneda
2021-01-22  0:23 ` [PATCH v2 5/9] ACPICA: Update version to 20201217 Version 20201217 Erik Kaneda
2021-01-22  0:23 ` [PATCH v2 6/9] ACPICA: Remove the MTMR (Mid-Timer) table Erik Kaneda
2021-01-22  0:23 ` [PATCH v2 7/9] ACPICA: Remove the VRTC table Erik Kaneda
2021-01-22  0:23 ` [PATCH v2 8/9] ACPICA: Updated all copyrights to 2021 Erik Kaneda
2021-01-22  0:23 ` [PATCH v2 9/9] ACPICA: Update version to 20210105 Erik Kaneda
2021-01-22 15:07 ` [PATCH v2 0/9] ACPICA release 20201217 and 20210105 Rafael J. Wysocki
2021-01-22 17:57   ` Kaneda, Erik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210122002357.370836-3-erik.kaneda@intel.com \
    --to=erik.kaneda@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=luzmaximilian@gmail.com \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.