summaryrefslogtreecommitdiffstats
path: root/source/components/namespace
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-07-26 18:20:00 +0000
committerjkim <jkim@FreeBSD.org>2013-07-26 18:20:00 +0000
commit8e9a373708032aaf58694e237e3889d7d3fd796f (patch)
treee05da15a04629f6e36af5ca6c81a2efda47a9dc3 /source/components/namespace
parent7aca7201724cb02a2a0541bd3ad2c0aca23dd076 (diff)
downloadFreeBSD-src-8e9a373708032aaf58694e237e3889d7d3fd796f.zip
FreeBSD-src-8e9a373708032aaf58694e237e3889d7d3fd796f.tar.gz
Import ACPICA 20130725.
Diffstat (limited to 'source/components/namespace')
-rw-r--r--source/components/namespace/nspredef.c18
-rw-r--r--source/components/namespace/nswalk.c18
-rw-r--r--source/components/namespace/nsxfeval.c14
3 files changed, 33 insertions, 17 deletions
diff --git a/source/components/namespace/nspredef.c b/source/components/namespace/nspredef.c
index 7122e7a..7b7e3e3 100644
--- a/source/components/namespace/nspredef.c
+++ b/source/components/namespace/nspredef.c
@@ -166,6 +166,16 @@ AcpiNsCheckReturnValue (
}
/*
+ *
+ * 4) If there is no return value and it is optional, just return
+ * AE_OK (_WAK).
+ */
+ if (!(*ReturnObjectPtr))
+ {
+ goto Exit;
+ }
+
+ /*
* For returned Package objects, check the type of all sub-objects.
* Note: Package may have been newly created by call above.
*/
@@ -293,7 +303,13 @@ TypeErrorExit:
AcpiUtGetExpectedReturnTypes (TypeBuffer, ExpectedBtypes);
- if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT)
+ if (!ReturnObject)
+ {
+ ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
+ "Expected return object of type %s",
+ TypeBuffer));
+ }
+ else if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT)
{
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
"Return type mismatch - found %s, expected %s",
diff --git a/source/components/namespace/nswalk.c b/source/components/namespace/nswalk.c
index 0b25ffd..577b89b 100644
--- a/source/components/namespace/nswalk.c
+++ b/source/components/namespace/nswalk.c
@@ -165,9 +165,9 @@ AcpiNsGetNextNodeTyped (
* MaxDepth - Depth to which search is to reach
* Flags - Whether to unlock the NS before invoking
* the callback routine
- * PreOrderVisit - Called during tree pre-order visit
+ * DescendingCallback - Called during tree descent
* when an object of "Type" is found
- * PostOrderVisit - Called during tree post-order visit
+ * AscendingCallback - Called during tree ascent
* when an object of "Type" is found
* Context - Passed to user function(s) above
* ReturnValue - from the UserFunction if terminated
@@ -195,8 +195,8 @@ AcpiNsWalkNamespace (
ACPI_HANDLE StartNode,
UINT32 MaxDepth,
UINT32 Flags,
- ACPI_WALK_CALLBACK PreOrderVisit,
- ACPI_WALK_CALLBACK PostOrderVisit,
+ ACPI_WALK_CALLBACK DescendingCallback,
+ ACPI_WALK_CALLBACK AscendingCallback,
void *Context,
void **ReturnValue)
{
@@ -274,22 +274,22 @@ AcpiNsWalkNamespace (
}
/*
- * Invoke the user function, either pre-order or post-order
+ * Invoke the user function, either descending, ascending,
* or both.
*/
if (!NodePreviouslyVisited)
{
- if (PreOrderVisit)
+ if (DescendingCallback)
{
- Status = PreOrderVisit (ChildNode, Level,
+ Status = DescendingCallback (ChildNode, Level,
Context, ReturnValue);
}
}
else
{
- if (PostOrderVisit)
+ if (AscendingCallback)
{
- Status = PostOrderVisit (ChildNode, Level,
+ Status = AscendingCallback (ChildNode, Level,
Context, ReturnValue);
}
}
diff --git a/source/components/namespace/nsxfeval.c b/source/components/namespace/nsxfeval.c
index 6a2649a..e5c1e17 100644
--- a/source/components/namespace/nsxfeval.c
+++ b/source/components/namespace/nsxfeval.c
@@ -574,9 +574,9 @@ AcpiNsResolveReferences (
* PARAMETERS: Type - ACPI_OBJECT_TYPE to search for
* StartObject - Handle in namespace where search begins
* MaxDepth - Depth to which search is to reach
- * PreOrderVisit - Called during tree pre-order visit
+ * DescendingCallback - Called during tree descent
* when an object of "Type" is found
- * PostOrderVisit - Called during tree post-order visit
+ * AscendingCallback - Called during tree ascent
* when an object of "Type" is found
* Context - Passed to user function(s) above
* ReturnValue - Location where return value of
@@ -605,8 +605,8 @@ AcpiWalkNamespace (
ACPI_OBJECT_TYPE Type,
ACPI_HANDLE StartObject,
UINT32 MaxDepth,
- ACPI_WALK_CALLBACK PreOrderVisit,
- ACPI_WALK_CALLBACK PostOrderVisit,
+ ACPI_WALK_CALLBACK DescendingCallback,
+ ACPI_WALK_CALLBACK AscendingCallback,
void *Context,
void **ReturnValue)
{
@@ -620,7 +620,7 @@ AcpiWalkNamespace (
if ((Type > ACPI_TYPE_LOCAL_MAX) ||
(!MaxDepth) ||
- (!PreOrderVisit && !PostOrderVisit))
+ (!DescendingCallback && !AscendingCallback))
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
@@ -655,8 +655,8 @@ AcpiWalkNamespace (
}
Status = AcpiNsWalkNamespace (Type, StartObject, MaxDepth,
- ACPI_NS_WALK_UNLOCK, PreOrderVisit,
- PostOrderVisit, Context, ReturnValue);
+ ACPI_NS_WALK_UNLOCK, DescendingCallback,
+ AscendingCallback, Context, ReturnValue);
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
OpenPOWER on IntegriCloud