Skip to contentSkip to conversation

ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks

PATCH In review Rafael J. Wysocki 2 participants 2 messages Nov 16, 2012 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks

From: Rafael J. Wysocki <[email protected]>

Currently acpi_dev_process_resource() returns AE_ABORT_METHOD to terminate the acpi_walk_resources() it is called from if the .preproc() routine provided by the caller of acpi_dev_get_resources() initiating the resources walk returns an error code. It is better to use AE_CTRL_TERMINATE for this purpose, however, so do that.

---
 drivers/acpi/resource.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/resource.c +1 -1
Index: linux/drivers/acpi/resource.c
===================================================================
@@ -446,7 +446,7 @@ static acpi_status acpi_dev_process_reso
 		ret = c->preproc(ares, c->preproc_data);
 		if (ret < 0) {
 			c->error = ret;
-			return AE_ABORT_METHOD;
+			return AE_CTRL_TERMINATE;
 		} else if (ret > 0) {
 			return AE_OK;
 		}
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

Currently acpi_dev_process_resource() returns AE_ABORT_METHOD to terminate the acpi_walk_resources() it is called from if the .preproc() routine provided by the caller of acpi_dev_get_resources() initiating the resources walk returns an error code. It is better to use AE_CTRL_TERMINATE for this purpose, however, so do that.

Quoted 17 lines
---
 drivers/acpi/resource.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/acpi/resource.c
===================================================================

drivers/acpi/resource.c +1 -1
@@ -446,7 +446,7 @@ static acpi_status acpi_dev_process_reso
 		ret = c->preproc(ares, c->preproc_data);
 		if (ret < 0) {
 			c->error = ret;
-			return AE_ABORT_METHOD;
+			return AE_CTRL_TERMINATE;
 		} else if (ret > 0) {
 			return AE_OK;
 		}