summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/compiler/aslopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslopt.c')
-rw-r--r--sys/contrib/dev/acpica/compiler/aslopt.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslopt.c b/sys/contrib/dev/acpica/compiler/aslopt.c
index 691f802..244e46c 100644
--- a/sys/contrib/dev/acpica/compiler/aslopt.c
+++ b/sys/contrib/dev/acpica/compiler/aslopt.c
@@ -127,9 +127,9 @@ OptSearchToRoot (
/*
- * Check if search-to-root can be utilized. Use the last NameSeg of
+ * Check if search-to-root can be utilized. Use the last NameSeg of
* the NamePath and 1) See if can be found and 2) If found, make
- * sure that it is the same node that we want. If there is another
+ * sure that it is the same node that we want. If there is another
* name in the search path before the one we want, the nodes will
* not match, and we cannot use this optimization.
*/
@@ -149,7 +149,7 @@ OptSearchToRoot (
/*
* We found the name, but we must check to make sure that the node
- * matches. Otherwise, there is another identical name in the search
+ * matches. Otherwise, there is another identical name in the search
* path that precludes the use of this optimization.
*/
if (Node != TargetNode)
@@ -233,7 +233,7 @@ OptBuildShortestPath (
/*
* Determine the maximum number of NameSegs that the Target and Current paths
- * can possibly have in common. (To optimize, we have to have at least 1)
+ * can possibly have in common. (To optimize, we have to have at least 1)
*
* Note: The external NamePath string lengths are always a multiple of 5
* (ACPI_NAME_SIZE + separator)
@@ -254,12 +254,11 @@ OptBuildShortestPath (
{
/* Compare two single NameSegs */
- if (ACPI_STRNCMP (
- &((char *) TargetPath->Pointer)[(NumCommonSegments *
- ACPI_PATH_SEGMENT_LENGTH) + 1],
- &((char *) CurrentPath->Pointer)[(NumCommonSegments *
- ACPI_PATH_SEGMENT_LENGTH) + 1],
- ACPI_NAME_SIZE))
+ if (!ACPI_COMPARE_NAME (
+ &((char *) TargetPath->Pointer)[
+ (NumCommonSegments * ACPI_PATH_SEGMENT_LENGTH) + 1],
+ &((char *) CurrentPath->Pointer)[
+ (NumCommonSegments * ACPI_PATH_SEGMENT_LENGTH) + 1]))
{
/* Mismatch */
@@ -371,7 +370,7 @@ OptBuildShortestPath (
/*
* Check to make sure that the optimization finds the node we are
- * looking for. This is simply a sanity check on the new
+ * looking for. This is simply a sanity check on the new
* path that has been created.
*/
Status = AcpiNsLookup (&ScopeInfo, NewPath,
@@ -453,7 +452,7 @@ OptOptimizeNameDeclaration (
{
/*
* The current scope is the root, and the namepath has a root prefix
- * that is therefore extraneous. Remove it.
+ * that is therefore extraneous. Remove it.
*/
*NewPath = &AmlNameString[1];
@@ -470,7 +469,7 @@ OptOptimizeNameDeclaration (
/*
* Check to make sure that the optimization finds the node we are
- * looking for. This is simply a sanity check on the new
+ * looking for. This is simply a sanity check on the new
* path that has been created.
*
* We know that we are at the root, so NULL is used for the scope.
@@ -533,7 +532,7 @@ OptOptimizeNameDeclaration (
* AmlNameString - Unoptimized namepath
* TargetNode - Node to which AmlNameString refers
*
- * RETURN: None. If path is optimized, the Op is updated with new path
+ * RETURN: None. If path is optimized, the Op is updated with new path
*
* DESCRIPTION: Optimize a Named Declaration or Reference to the minimal length.
* Must take into account both the current location in the
@@ -608,7 +607,7 @@ OptOptimizeNamePath (
/*
* We need to obtain the node that represents the current scope -- where
- * we are right now in the namespace. We will compare this path
+ * we are right now in the namespace. We will compare this path
* against the Namepath, looking for commonality.
*/
CurrentNode = AcpiGbl_RootNode;
@@ -741,7 +740,7 @@ OptOptimizeNamePath (
/*
* Success from above indicates that the NamePath was successfully
- * optimized. We need to update the parse op with the new name
+ * optimized. We need to update the parse op with the new name
*/
if (ACPI_SUCCESS (Status))
{
@@ -803,4 +802,3 @@ OptOptimizeNamePath (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, "\n"));
return_VOID;
}
-
OpenPOWER on IntegriCloud