提交 08237974 编写于 作者: L Lin Ming 提交者: Len Brown

ACPI: replace AE_BAD_ADDRESS exception code with AE_ERROR

The AE_BAD_ADDRESS exception code is now unused in ACPICA.
For linux, it's only used at wmi.c and acer-wmi.c.
I checked both wmi.c and acer-wmi.c, the AE_BAD_ADDRESS exception code
has no special meaning. The parent functions just call AE_SUCCESS() or
AE_FAILURE() to check the return status.
So it's safe to replace AE_BAD_ADDRESS with AE_ERROR.

Signed-off-by Lin Ming <ming.m.lin@intel.com>
Signed-off-by: NAndi Kleen <ak@linux.intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 36eec5e2
...@@ -242,7 +242,7 @@ u32 method_id, const struct acpi_buffer *in, struct acpi_buffer *out) ...@@ -242,7 +242,7 @@ u32 method_id, const struct acpi_buffer *in, struct acpi_buffer *out)
char method[4] = "WM"; char method[4] = "WM";
if (!find_guid(guid_string, &wblock)) if (!find_guid(guid_string, &wblock))
return AE_BAD_ADDRESS; return AE_ERROR;
block = &wblock->gblock; block = &wblock->gblock;
handle = wblock->handle; handle = wblock->handle;
...@@ -304,7 +304,7 @@ struct acpi_buffer *out) ...@@ -304,7 +304,7 @@ struct acpi_buffer *out)
return AE_BAD_PARAMETER; return AE_BAD_PARAMETER;
if (!find_guid(guid_string, &wblock)) if (!find_guid(guid_string, &wblock))
return AE_BAD_ADDRESS; return AE_ERROR;
block = &wblock->gblock; block = &wblock->gblock;
handle = wblock->handle; handle = wblock->handle;
...@@ -314,7 +314,7 @@ struct acpi_buffer *out) ...@@ -314,7 +314,7 @@ struct acpi_buffer *out)
/* Check GUID is a data block */ /* Check GUID is a data block */
if (block->flags & (ACPI_WMI_EVENT | ACPI_WMI_METHOD)) if (block->flags & (ACPI_WMI_EVENT | ACPI_WMI_METHOD))
return AE_BAD_ADDRESS; return AE_ERROR;
input.count = 1; input.count = 1;
input.pointer = wq_params; input.pointer = wq_params;
...@@ -385,7 +385,7 @@ const struct acpi_buffer *in) ...@@ -385,7 +385,7 @@ const struct acpi_buffer *in)
return AE_BAD_DATA; return AE_BAD_DATA;
if (!find_guid(guid_string, &wblock)) if (!find_guid(guid_string, &wblock))
return AE_BAD_ADDRESS; return AE_ERROR;
block = &wblock->gblock; block = &wblock->gblock;
handle = wblock->handle; handle = wblock->handle;
...@@ -395,7 +395,7 @@ const struct acpi_buffer *in) ...@@ -395,7 +395,7 @@ const struct acpi_buffer *in)
/* Check GUID is a data block */ /* Check GUID is a data block */
if (block->flags & (ACPI_WMI_EVENT | ACPI_WMI_METHOD)) if (block->flags & (ACPI_WMI_EVENT | ACPI_WMI_METHOD))
return AE_BAD_ADDRESS; return AE_ERROR;
input.count = 2; input.count = 2;
input.pointer = params; input.pointer = params;
......
...@@ -476,7 +476,7 @@ struct wmi_interface *iface) ...@@ -476,7 +476,7 @@ struct wmi_interface *iface)
} }
break; break;
default: default:
return AE_BAD_ADDRESS; return AE_ERROR;
} }
return AE_OK; return AE_OK;
} }
...@@ -514,7 +514,7 @@ static acpi_status AMW0_set_u32(u32 value, u32 cap, struct wmi_interface *iface) ...@@ -514,7 +514,7 @@ static acpi_status AMW0_set_u32(u32 value, u32 cap, struct wmi_interface *iface)
break; break;
} }
default: default:
return AE_BAD_ADDRESS; return AE_ERROR;
} }
/* Actually do the set */ /* Actually do the set */
...@@ -689,7 +689,7 @@ struct wmi_interface *iface) ...@@ -689,7 +689,7 @@ struct wmi_interface *iface)
return 0; return 0;
} }
default: default:
return AE_BAD_ADDRESS; return AE_ERROR;
} }
status = WMI_execute_u32(method_id, 0, &result); status = WMI_execute_u32(method_id, 0, &result);
...@@ -735,7 +735,7 @@ static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface) ...@@ -735,7 +735,7 @@ static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface)
} }
break; break;
default: default:
return AE_BAD_ADDRESS; return AE_ERROR;
} }
return WMI_execute_u32(method_id, (u32)value, NULL); return WMI_execute_u32(method_id, (u32)value, NULL);
} }
...@@ -785,7 +785,7 @@ static struct wmi_interface wmid_interface = { ...@@ -785,7 +785,7 @@ static struct wmi_interface wmid_interface = {
static acpi_status get_u32(u32 *value, u32 cap) static acpi_status get_u32(u32 *value, u32 cap)
{ {
acpi_status status = AE_BAD_ADDRESS; acpi_status status = AE_ERROR;
switch (interface->type) { switch (interface->type) {
case ACER_AMW0: case ACER_AMW0:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册