From 63cc0801dfe62b5d69699f0b1d633b9874b00e19 Mon Sep 17 00:00:00 2001 From: aystarik Date: Wed, 29 Jun 2005 18:33:58 +0000 Subject: [PATCH] Cleanup and fixed a comment date 2001.11.19.21.54.00; author rmoore1; state Exp; --- source/components/namespace/nssearch.c | 27 +++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/source/components/namespace/nssearch.c b/source/components/namespace/nssearch.c index 850d8a248..e91a0c679 100644 --- a/source/components/namespace/nssearch.c +++ b/source/components/namespace/nssearch.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: nssearch - Namespace search - * $Revision: 1.76 $ + * $Revision: 1.77 $ * ******************************************************************************/ @@ -174,7 +174,7 @@ AcpiNsSearchNode ( if (ScopeName) { ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching %s [%p] For %4.4s (type %X)\n", - ScopeName, Node, (char*)&TargetName, Type)); + ScopeName, Node, (char *) &TargetName, Type)); ACPI_MEM_FREE (ScopeName); } @@ -221,7 +221,7 @@ AcpiNsSearchNode ( ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Name %4.4s (actual type %X) found at %p\n", - (char*)&TargetName, NextNode->Type, NextNode)); + (char *) &TargetName, NextNode->Type, NextNode)); *ReturnNode = NextNode; return_ACPI_STATUS (AE_OK); @@ -246,7 +246,7 @@ AcpiNsSearchNode ( /* Searched entire table, not found */ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Name %4.4s (type %X) not found at %p\n", - (char*)&TargetName, Type, NextNode)); + (char *) &TargetName, Type, NextNode)); return_ACPI_STATUS (AE_NOT_FOUND); } @@ -303,13 +303,13 @@ AcpiNsSearchParentTree ( if (!ParentNode) { ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] has no parent\n", - (char*)&TargetName)); + (char *) &TargetName)); } if (AcpiNsLocal (Type)) { ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] type %X is local(no search)\n", - (char*)&TargetName, Type)); + (char *) &TargetName, Type)); } return_ACPI_STATUS (AE_NOT_FOUND); @@ -317,7 +317,7 @@ AcpiNsSearchParentTree ( /* Search the parent tree */ - ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching parent for %4.4s\n", (char*)&TargetName)); + ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching parent for %4.4s\n", (char *) &TargetName)); /* * Search parents until found the target or we have backed up to @@ -325,12 +325,13 @@ AcpiNsSearchParentTree ( */ while (ParentNode) { - /* Search parent scope */ - /* TBD: [Investigate] Why ACPI_TYPE_ANY? */ - + /* + * Search parent scope. Use TYPE_ANY because we don't care about the + * object type at this point, we only care about the existence of + * the actual name we are searching for. Typechecking comes later. + */ Status = AcpiNsSearchNode (TargetName, ParentNode, ACPI_TYPE_ANY, ReturnNode); - if (ACPI_SUCCESS (Status)) { return_ACPI_STATUS (Status); @@ -437,7 +438,7 @@ AcpiNsSearchAndEnter ( } /* - * Not found in the table. If we are NOT performing the + * The name was not found. If we are NOT performing the * first pass (name entry) of loading the namespace, search * the parent tree (all the way to the root if necessary.) * We don't want to perform the parent search when the @@ -466,7 +467,7 @@ AcpiNsSearchAndEnter ( if (InterpreterMode == IMODE_EXECUTE) { ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%4.4s Not found in %p [Not adding]\n", - (char*)&TargetName, Node)); + (char *) &TargetName, Node)); return_ACPI_STATUS (AE_NOT_FOUND); }