]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Hand/Handle.c
Code Scrub for Dxe Core.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Hand / Handle.c
index 72657d8756cf2d92a5d732e95422c683f87937ee..7f59ce9a9dc48fe820efac5ad8e0ba321a275aa5 100644 (file)
@@ -59,9 +59,9 @@ CoreReleaseProtocolLock (
 /**\r
   Check whether a handle is a valid EFI_HANDLE\r
 \r
-  @param  UserHandle             The handle to check \r
+  @param  UserHandle             The handle to check\r
 \r
-  @retval EFI_INVALID_PARAMETER  The handle is NULL or not a valid EFI_HANDLE. \r
+  @retval EFI_INVALID_PARAMETER  The handle is NULL or not a valid EFI_HANDLE.\r
   @retval EFI_SUCCESS            The handle is valid EFI_HANDLE.\r
 \r
 **/\r
@@ -88,8 +88,8 @@ CoreValidateHandle (
   Finds the protocol entry for the requested protocol.\r
   The gProtocolDatabaseLock must be owned\r
 \r
-  @param  Protocol               The ID of the protocol \r
-  @param  Create                 Create a new entry if not found \r
+  @param  Protocol               The ID of the protocol\r
+  @param  Create                 Create a new entry if not found\r
 \r
   @return Protocol entry\r
 \r
@@ -111,8 +111,8 @@ CoreFindProtocolEntry (
   //\r
 \r
   ProtEntry = NULL;\r
-  for (Link = mProtocolDatabase.ForwardLink; \r
-       Link != &mProtocolDatabase; \r
+  for (Link = mProtocolDatabase.ForwardLink;\r
+       Link != &mProtocolDatabase;\r
        Link = Link->ForwardLink) {\r
 \r
     Item = CR(Link, PROTOCOL_ENTRY, AllEntries, PROTOCOL_ENTRY_SIGNATURE);\r
@@ -128,12 +128,12 @@ CoreFindProtocolEntry (
   }\r
 \r
   //\r
-  // If the protocol entry was not found and Create is TRUE, then \r
+  // If the protocol entry was not found and Create is TRUE, then\r
   // allocate a new entry\r
-  //     \r
+  //\r
   if ((ProtEntry == NULL) && Create) {\r
     ProtEntry = CoreAllocateBootServicesPool (sizeof(PROTOCOL_ENTRY));\r
-    \r
+\r
     if (ProtEntry != NULL) {\r
       //\r
       // Initialize new protocol entry structure\r
@@ -160,9 +160,9 @@ CoreFindProtocolEntry (
   Note: This function doesn't do parameters checking, it's caller's responsibility\r
   to pass in valid parameters.\r
 \r
-  @param  Handle                 The handle to search the protocol on \r
-  @param  Protocol               GUID of the protocol \r
-  @param  Interface              The interface for the protocol being searched \r
+  @param  Handle                 The handle to search the protocol on\r
+  @param  Protocol               GUID of the protocol\r
+  @param  Interface              The interface for the protocol being searched\r
 \r
   @return Protocol instance (NULL: Not found)\r
 \r
@@ -212,8 +212,8 @@ CoreFindProtocolInterface (
 /**\r
   Removes an event from a register protocol notify list on a protocol.\r
 \r
-  @param  Event                  The event to search for in the protocol \r
-                                 database. \r
+  @param  Event                  The event to search for in the protocol\r
+                                 database.\r
 \r
   @return EFI_SUCCESS   if the event was found and removed.\r
   @return EFI_NOT_FOUND if the event was not found in the protocl database.\r
@@ -231,14 +231,14 @@ CoreUnregisterProtocolNotifyEvent (
 \r
   CoreAcquireProtocolLock ();\r
 \r
-  for ( Link =  mProtocolDatabase.ForwardLink; \r
-        Link != &mProtocolDatabase; \r
+  for ( Link =  mProtocolDatabase.ForwardLink;\r
+        Link != &mProtocolDatabase;\r
         Link =  Link->ForwardLink) {\r
 \r
     ProtEntry = CR(Link, PROTOCOL_ENTRY, AllEntries, PROTOCOL_ENTRY_SIGNATURE);\r
 \r
-    for ( NotifyLink =  ProtEntry->Notify.ForwardLink; \r
-          NotifyLink != &ProtEntry->Notify; \r
+    for ( NotifyLink =  ProtEntry->Notify.ForwardLink;\r
+          NotifyLink != &ProtEntry->Notify;\r
           NotifyLink =  NotifyLink->ForwardLink) {\r
 \r
       ProtNotify = CR(NotifyLink, PROTOCOL_NOTIFY, Link, PROTOCOL_NOTIFY_SIGNATURE);\r
@@ -261,8 +261,8 @@ CoreUnregisterProtocolNotifyEvent (
 /**\r
   Removes all the events in the protocol database that match Event.\r
 \r
-  @param  Event                  The event to search for in the protocol \r
-                                 database. \r
+  @param  Event                  The event to search for in the protocol\r
+                                 database.\r
 \r
   @return EFI_SUCCESS when done searching the entire database.\r
 \r
@@ -288,12 +288,12 @@ CoreUnregisterProtocolNotify (
   Wrapper function to CoreInstallProtocolInterfaceNotify.  This is the public API which\r
   Calls the private one which contains a BOOLEAN parameter for notifications\r
 \r
-  @param  UserHandle             The handle to install the protocol handler on, \r
-                                 or NULL if a new handle is to be allocated \r
-  @param  Protocol               The protocol to add to the handle \r
-  @param  InterfaceType          Indicates whether Interface is supplied in \r
-                                 native form. \r
-  @param  Interface              The interface for the protocol being added \r
+  @param  UserHandle             The handle to install the protocol handler on,\r
+                                 or NULL if a new handle is to be allocated\r
+  @param  Protocol               The protocol to add to the handle\r
+  @param  InterfaceType          Indicates whether Interface is supplied in\r
+                                 native form.\r
+  @param  Interface              The interface for the protocol being added\r
 \r
   @return Status code\r
 \r
@@ -308,10 +308,10 @@ CoreInstallProtocolInterface (
   )\r
 {\r
   return CoreInstallProtocolInterfaceNotify (\r
-            UserHandle, \r
-            Protocol, \r
-            InterfaceType, \r
-            Interface, \r
+            UserHandle,\r
+            Protocol,\r
+            InterfaceType,\r
+            Interface,\r
             TRUE\r
             );\r
 }\r
@@ -320,17 +320,17 @@ CoreInstallProtocolInterface (
 /**\r
   Installs a protocol interface into the boot services environment.\r
 \r
-  @param  UserHandle             The handle to install the protocol handler on, \r
-                                 or NULL if a new handle is to be allocated \r
-  @param  Protocol               The protocol to add to the handle \r
-  @param  InterfaceType          Indicates whether Interface is supplied in \r
-                                 native form. \r
-  @param  Interface              The interface for the protocol being added \r
-  @param  Notify                 indicates whether notify the notification list  \r
-                                 for this protocol \r
-\r
-  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
-  @retval EFI_OUT_OF_RESOURCES   No enough buffer to allocate \r
+  @param  UserHandle             The handle to install the protocol handler on,\r
+                                 or NULL if a new handle is to be allocated\r
+  @param  Protocol               The protocol to add to the handle\r
+  @param  InterfaceType          Indicates whether Interface is supplied in\r
+                                 native form.\r
+  @param  Interface              The interface for the protocol being added\r
+  @param  Notify                 indicates whether notify the notification list\r
+                                 for this protocol\r
+\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter\r
+  @retval EFI_OUT_OF_RESOURCES   No enough buffer to allocate\r
   @retval EFI_SUCCESS            Protocol interface successfully installed\r
 \r
 **/\r
@@ -380,7 +380,7 @@ CoreInstallProtocolInterfaceNotify (
   }\r
 \r
   //\r
-  // Lock the protocol database \r
+  // Lock the protocol database\r
   //\r
   CoreAcquireProtocolLock ();\r
 \r
@@ -429,7 +429,7 @@ CoreInstallProtocolInterfaceNotify (
     // in the system\r
     //\r
     InsertTailList (&gHandleList, &Handle->AllHandles);\r
-  } \r
+  }\r
 \r
   Status = CoreValidateHandle (Handle);\r
   if (EFI_ERROR (Status)) {\r
@@ -456,19 +456,19 @@ CoreInstallProtocolInterfaceNotify (
   Prot->OpenListCount = 0;\r
 \r
   //\r
-  // Add this protocol interface to the head of the supported \r
+  // Add this protocol interface to the head of the supported\r
   // protocol list for this handle\r
   //\r
   InsertHeadList (&Handle->Protocols, &Prot->Link);\r
 \r
   //\r
-  // Add this protocol interface to the tail of the \r
+  // Add this protocol interface to the tail of the\r
   // protocol entry\r
-  // \r
+  //\r
   InsertTailList (&ProtEntry->Protocols, &Prot->ByProtocol);\r
 \r
   //\r
-  // Notify the notification list for this protocol \r
+  // Notify the notification list for this protocol\r
   //\r
   if (Notify) {\r
     CoreNotifyProtocolEntry (ProtEntry);\r
@@ -506,14 +506,14 @@ Done:
   occures all the protocols added by this function are removed. This is\r
   basically a lib function to save space.\r
 \r
-  @param  Handle                 The handle to install the protocol handlers on, \r
-                                 or NULL if a new handle is to be allocated \r
-  @param  ...                    EFI_GUID followed by protocol instance. A NULL \r
-                                 terminates the  list. The pairs are the \r
-                                 arguments to InstallProtocolInterface(). All the \r
-                                 protocols are added to Handle. \r
+  @param  Handle                 The handle to install the protocol handlers on,\r
+                                 or NULL if a new handle is to be allocated\r
+  @param  ...                    EFI_GUID followed by protocol instance. A NULL\r
+                                 terminates the  list. The pairs are the\r
+                                 arguments to InstallProtocolInterface(). All the\r
+                                 protocols are added to Handle.\r
 \r
-  @retval EFI_INVALID_PARAMETER  Handle is NULL. \r
+  @retval EFI_INVALID_PARAMETER  Handle is NULL.\r
   @retval EFI_SUCCESS            Protocol interfaces successfully installed.\r
 \r
 **/\r
@@ -533,14 +533,14 @@ CoreInstallMultipleProtocolInterfaces (
   EFI_HANDLE                OldHandle;\r
   EFI_HANDLE                DeviceHandle;\r
   EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
-  \r
+\r
   if (Handle == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
+  //\r
+  // Syncronize with notifcations.\r
   //\r
-  // Syncronize with notifcations. \r
-  // \r
   OldTpl = CoreRaiseTpl (TPL_NOTIFY);\r
   OldHandle = *Handle;\r
 \r
@@ -571,13 +571,13 @@ CoreInstallMultipleProtocolInterfaces (
         continue;\r
       }\r
     }\r
-  \r
+\r
     //\r
     // Install it\r
     //\r
     Status = CoreInstallProtocolInterface (Handle, Protocol, EFI_NATIVE_INTERFACE, Interface);\r
   }\r
-  \r
+\r
   //\r
   // If there was an error, remove all the interfaces that were installed without any errors\r
   //\r
@@ -590,7 +590,7 @@ CoreInstallMultipleProtocolInterfaces (
       Protocol = VA_ARG (Args, EFI_GUID *);\r
       Interface = VA_ARG (Args, VOID *);\r
       CoreUninstallProtocolInterface (*Handle, Protocol, Interface);\r
-    }        \r
+    }\r
     *Handle = OldHandle;\r
   }\r
 \r
@@ -608,11 +608,11 @@ CoreInstallMultipleProtocolInterfaces (
   Note: This function doesn't do parameters checking, it's caller's responsibility\r
   to pass in valid parameters.\r
 \r
-  @param  UserHandle             The handle on which the protocol is installed \r
-  @param  Prot                   The protocol to disconnect drivers from \r
+  @param  UserHandle             The handle on which the protocol is installed\r
+  @param  Prot                   The protocol to disconnect drivers from\r
 \r
-  @retval EFI_SUCCESS            Drivers using the protocol interface are all \r
-                                 disconnected \r
+  @retval EFI_SUCCESS            Drivers using the protocol interface are all\r
+                                 disconnected\r
   @retval EFI_ACCESS_DENIED      Failed to disconnect one or all of the drivers\r
 \r
 **/\r
@@ -628,7 +628,7 @@ CoreDisconnectControllersUsingProtocolInterface (
   OPEN_PROTOCOL_DATA    *OpenData;\r
 \r
   Status = EFI_SUCCESS;\r
-  \r
+\r
   //\r
   // Attempt to disconnect all drivers from this protocol interface\r
   //\r
@@ -661,10 +661,10 @@ CoreDisconnectControllersUsingProtocolInterface (
             (Link != &Prot->OpenList) && !ItemFound;\r
             Link = Link->ForwardLink ) {\r
         OpenData = CR (Link, OPEN_PROTOCOL_DATA, Link, OPEN_PROTOCOL_DATA_SIGNATURE);\r
-        if (OpenData->Attributes & \r
+        if (OpenData->Attributes &\r
             (EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL | EFI_OPEN_PROTOCOL_GET_PROTOCOL | EFI_OPEN_PROTOCOL_TEST_PROTOCOL)) {\r
           ItemFound = TRUE;\r
-          RemoveEntryList (&OpenData->Link);  \r
+          RemoveEntryList (&OpenData->Link);\r
           Prot->OpenListCount--;\r
           CoreFreePool (OpenData);\r
         }\r
@@ -692,11 +692,11 @@ CoreDisconnectControllersUsingProtocolInterface (
   If the last protocol interface is remove from the handle, the\r
   handle is freed.\r
 \r
-  @param  UserHandle             The handle to remove the protocol handler from \r
-  @param  Protocol               The protocol, of protocol:interface, to remove \r
-  @param  Interface              The interface, of protocol:interface, to remove \r
+  @param  UserHandle             The handle to remove the protocol handler from\r
+  @param  Protocol               The protocol, of protocol:interface, to remove\r
+  @param  Interface              The interface, of protocol:interface, to remove\r
 \r
-  @retval EFI_INVALID_PARAMETER  Protocol is NULL. \r
+  @retval EFI_INVALID_PARAMETER  Protocol is NULL.\r
   @retval EFI_SUCCESS            Protocol interface successfully uninstalled.\r
 \r
 **/\r
@@ -768,7 +768,7 @@ CoreUninstallProtocolInterface (
     //\r
     gHandleDatabaseKey++;\r
     Handle->Key = gHandleDatabaseKey;\r
-    \r
+\r
     //\r
     // Remove the protocol interface from the handle\r
     //\r
@@ -791,7 +791,7 @@ CoreUninstallProtocolInterface (
     CoreFreePool (Handle);\r
   }\r
 \r
-Done:  \r
+Done:\r
   //\r
   // Done, unlock the database and return\r
   //\r
@@ -807,11 +807,11 @@ Done:
   This function calls UnisatllProtocolInterface() in a loop. This is\r
   basically a lib function to save space.\r
 \r
-  @param  Handle                 The handle to uninstall the protocol \r
-  @param  ...                    EFI_GUID followed by protocol instance. A NULL \r
-                                 terminates the  list. The pairs are the \r
-                                 arguments to UninstallProtocolInterface(). All \r
-                                 the protocols are added to Handle. \r
+  @param  Handle                 The handle to uninstall the protocol\r
+  @param  ...                    EFI_GUID followed by protocol instance. A NULL\r
+                                 terminates the  list. The pairs are the\r
+                                 arguments to UninstallProtocolInterface(). All\r
+                                 the protocols are added to Handle.\r
 \r
   @return Status code\r
 \r
@@ -860,18 +860,18 @@ CoreUninstallMultipleProtocolInterfaces (
       Protocol = VA_ARG(Args, EFI_GUID *);\r
       Interface = VA_ARG(Args, VOID *);\r
       CoreInstallProtocolInterface (&Handle, Protocol, EFI_NATIVE_INTERFACE, Interface);\r
-    }        \r
+    }\r
   }\r
 \r
   return Status;\r
-}    \r
+}\r
 \r
 \r
 /**\r
   Locate a certain GUID protocol interface in a Handle's protocols.\r
 \r
-  @param  UserHandle             The handle to obtain the protocol interface on \r
-  @param  Protocol               The GUID of the protocol \r
+  @param  UserHandle             The handle to obtain the protocol interface on\r
+  @param  Protocol               The GUID of the protocol\r
 \r
   @return The requested protocol interface for the handle\r
 \r
@@ -892,7 +892,7 @@ CoreGetProtocolInterface (
   if (EFI_ERROR (Status)) {\r
     return NULL;\r
   }\r
-  \r
+\r
   Handle = (IHANDLE *)UserHandle;\r
 \r
   //\r
@@ -913,10 +913,10 @@ CoreGetProtocolInterface (
 /**\r
   Queries a handle to determine if it supports a specified protocol.\r
 \r
-  @param  UserHandle             The handle being queried. \r
-  @param  Protocol               The published unique identifier of the protocol. \r
-  @param  Interface              Supplies the address where a pointer to the \r
-                                 corresponding Protocol Interface is returned. \r
+  @param  UserHandle             The handle being queried.\r
+  @param  Protocol               The published unique identifier of the protocol.\r
+  @param  Interface              Supplies the address where a pointer to the\r
+                                 corresponding Protocol Interface is returned.\r
 \r
   @return The requested protocol interface for the handle\r
 \r
@@ -930,11 +930,11 @@ CoreHandleProtocol (
   )\r
 {\r
   return CoreOpenProtocol (\r
-          UserHandle,     \r
-          Protocol, \r
-          Interface, \r
-          gDxeCoreImageHandle, \r
-          NULL,     \r
+          UserHandle,\r
+          Protocol,\r
+          Interface,\r
+          gDxeCoreImageHandle,\r
+          NULL,\r
           EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL\r
           );\r
 }\r
@@ -946,18 +946,18 @@ CoreHandleProtocol (
   invokes it to obtain the protocol interface. Usage information\r
   is registered in the protocol data base.\r
 \r
-  @param  UserHandle             The handle to obtain the protocol interface on \r
-  @param  Protocol               The ID of the protocol \r
-  @param  Interface              The location to return the protocol interface \r
-  @param  ImageHandle            The handle of the Image that is opening the \r
-                                 protocol interface specified by Protocol and \r
-                                 Interface. \r
-  @param  ControllerHandle       The controller handle that is requiring this \r
-                                 interface. \r
-  @param  Attributes             The open mode of the protocol interface \r
-                                 specified by Handle and Protocol. \r
-\r
-  @retval EFI_INVALID_PARAMETER  Protocol is NULL. \r
+  @param  UserHandle             The handle to obtain the protocol interface on\r
+  @param  Protocol               The ID of the protocol\r
+  @param  Interface              The location to return the protocol interface\r
+  @param  ImageHandle            The handle of the Image that is opening the\r
+                                 protocol interface specified by Protocol and\r
+                                 Interface.\r
+  @param  ControllerHandle       The controller handle that is requiring this\r
+                                 interface.\r
+  @param  Attributes             The open mode of the protocol interface\r
+                                 specified by Handle and Protocol.\r
+\r
+  @retval EFI_INVALID_PARAMETER  Protocol is NULL.\r
   @retval EFI_SUCCESS            Get the protocol interface.\r
 \r
 **/\r
@@ -998,7 +998,7 @@ CoreOpenProtocol (
       *Interface = NULL;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Check for invalid UserHandle\r
   //\r
@@ -1065,7 +1065,7 @@ CoreOpenProtocol (
 \r
   //\r
   // This is the protocol interface entry for this protocol\r
-  //    \r
+  //\r
   if (Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) {\r
     *Interface = Prot->Interface;\r
   }\r
@@ -1075,7 +1075,7 @@ CoreOpenProtocol (
   Exclusive       = FALSE;\r
   for ( Link = Prot->OpenList.ForwardLink; Link != &Prot->OpenList; Link = Link->ForwardLink) {\r
     OpenData = CR (Link, OPEN_PROTOCOL_DATA, Link, OPEN_PROTOCOL_DATA_SIGNATURE);\r
-    ExactMatch =  (BOOLEAN)((OpenData->AgentHandle == ImageHandle) && \r
+    ExactMatch =  (BOOLEAN)((OpenData->AgentHandle == ImageHandle) &&\r
                             (OpenData->Attributes == Attributes)  &&\r
                             (OpenData->ControllerHandle == ControllerHandle));\r
     if (OpenData->Attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) {\r
@@ -1131,7 +1131,7 @@ CoreOpenProtocol (
           }\r
         }\r
       } while (Disconnect);\r
-    } \r
+    }\r
     break;\r
   case EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER :\r
   case EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL :\r
@@ -1174,25 +1174,25 @@ Done:
 /**\r
   Closes a protocol on a handle that was opened using OpenProtocol().\r
 \r
-  @param  UserHandle             The handle for the protocol interface that was \r
-                                 previously opened with OpenProtocol(), and is \r
-                                 now being closed. \r
-  @param  Protocol               The published unique identifier of the protocol. \r
-                                 It is the caller's responsibility to pass in a \r
-                                 valid GUID. \r
-  @param  AgentHandle            The handle of the agent that is closing the \r
-                                 protocol interface. \r
-  @param  ControllerHandle       If the agent that opened a protocol is a driver \r
-                                 that follows the EFI Driver Model, then this \r
-                                 parameter is the controller handle that required \r
-                                 the protocol interface. If the agent does not \r
-                                 follow the EFI Driver Model, then this parameter \r
-                                 is optional and may be NULL. \r
-\r
-  @retval EFI_SUCCESS            The protocol instance was closed. \r
-  @retval EFI_INVALID_PARAMETER  Handle, AgentHandle or ControllerHandle is not a \r
-                                 valid EFI_HANDLE. \r
-  @retval EFI_NOT_FOUND          Can not find the specified protocol or \r
+  @param  UserHandle             The handle for the protocol interface that was\r
+                                 previously opened with OpenProtocol(), and is\r
+                                 now being closed.\r
+  @param  Protocol               The published unique identifier of the protocol.\r
+                                 It is the caller's responsibility to pass in a\r
+                                 valid GUID.\r
+  @param  AgentHandle            The handle of the agent that is closing the\r
+                                 protocol interface.\r
+  @param  ControllerHandle       If the agent that opened a protocol is a driver\r
+                                 that follows the EFI Driver Model, then this\r
+                                 parameter is the controller handle that required\r
+                                 the protocol interface. If the agent does not\r
+                                 follow the EFI Driver Model, then this parameter\r
+                                 is optional and may be NULL.\r
+\r
+  @retval EFI_SUCCESS            The protocol instance was closed.\r
+  @retval EFI_INVALID_PARAMETER  Handle, AgentHandle or ControllerHandle is not a\r
+                                 valid EFI_HANDLE.\r
+  @retval EFI_NOT_FOUND          Can not find the specified protocol or\r
                                  AgentHandle.\r
 \r
 **/\r
@@ -1202,7 +1202,7 @@ CoreCloseProtocol (
   IN  EFI_HANDLE                UserHandle,\r
   IN  EFI_GUID                  *Protocol,\r
   IN  EFI_HANDLE                AgentHandle,\r
-  IN  EFI_HANDLE                ControllerHandle  \r
+  IN  EFI_HANDLE                ControllerHandle\r
   )\r
 {\r
   EFI_STATUS          Status;\r
@@ -1253,7 +1253,7 @@ CoreCloseProtocol (
     OpenData = CR (Link, OPEN_PROTOCOL_DATA, Link, OPEN_PROTOCOL_DATA_SIGNATURE);\r
     Link = Link->ForwardLink;\r
     if ((OpenData->AgentHandle == AgentHandle) && (OpenData->ControllerHandle == ControllerHandle)) {\r
-        RemoveEntryList (&OpenData->Link);  \r
+        RemoveEntryList (&OpenData->Link);\r
         ProtocolInterface->OpenListCount--;\r
         CoreFreePool (OpenData);\r
         Status = EFI_SUCCESS;\r
@@ -1274,11 +1274,11 @@ Done:
 /**\r
   Return information about Opened protocols in the system\r
 \r
-  @param  UserHandle             The handle to close the protocol interface on \r
-  @param  Protocol               The ID of the protocol \r
-  @param  EntryBuffer            A pointer to a buffer of open protocol \r
-                                 information in the form of \r
-                                 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures. \r
+  @param  UserHandle             The handle to close the protocol interface on\r
+  @param  Protocol               The ID of the protocol\r
+  @param  EntryBuffer            A pointer to a buffer of open protocol\r
+                                 information in the form of\r
+                                 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.\r
   @param  EntryCount             Number of EntryBuffer entries\r
 \r
 **/\r
@@ -1319,11 +1319,11 @@ CoreOpenProtocolInformation (
   //\r
   // Count the number of Open Entries\r
   //\r
-  for ( Link = ProtocolInterface->OpenList.ForwardLink, Count = 0; \r
+  for ( Link = ProtocolInterface->OpenList.ForwardLink, Count = 0;\r
         (Link != &ProtocolInterface->OpenList) ;\r
         Link = Link->ForwardLink  ) {\r
     Count++;\r
-  } \r
+  }\r
 \r
   ASSERT (Count == ProtocolInterface->OpenListCount);\r
 \r
@@ -1340,7 +1340,7 @@ CoreOpenProtocolInformation (
   }\r
 \r
   Status = EFI_SUCCESS;\r
-  for ( Link = ProtocolInterface->OpenList.ForwardLink, Count = 0; \r
+  for ( Link = ProtocolInterface->OpenList.ForwardLink, Count = 0;\r
         (Link != &ProtocolInterface->OpenList);\r
         Link = Link->ForwardLink, Count++  ) {\r
     OpenData = CR (Link, OPEN_PROTOCOL_DATA, Link, OPEN_PROTOCOL_DATA_SIGNATURE);\r
@@ -1349,11 +1349,11 @@ CoreOpenProtocolInformation (
     Buffer[Count].ControllerHandle = OpenData->ControllerHandle;\r
     Buffer[Count].Attributes       = OpenData->Attributes;\r
     Buffer[Count].OpenCount        = OpenData->OpenCount;\r
-  } \r
+  }\r
 \r
   *EntryBuffer = Buffer;\r
   *EntryCount = Count;\r
-        \r
+\r
 Done:\r
   //\r
   // Done. Release the database lock are return\r
@@ -1369,22 +1369,22 @@ Done:
   Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated\r
   from pool.\r
 \r
-  @param  UserHandle             The handle from which to retrieve the list of \r
-                                 protocol interface GUIDs. \r
-  @param  ProtocolBuffer         A pointer to the list of protocol interface GUID \r
-                                 pointers that are installed on Handle. \r
-  @param  ProtocolBufferCount    A pointer to the number of GUID pointers present \r
-                                 in ProtocolBuffer. \r
-\r
-  @retval EFI_SUCCESS            The list of protocol interface GUIDs installed \r
-                                 on Handle was returned in ProtocolBuffer. The \r
-                                 number of protocol interface GUIDs was returned \r
-                                 in ProtocolBufferCount. \r
-  @retval EFI_INVALID_PARAMETER  Handle is NULL. \r
-  @retval EFI_INVALID_PARAMETER  Handle is not a valid EFI_HANDLE. \r
-  @retval EFI_INVALID_PARAMETER  ProtocolBuffer is NULL. \r
-  @retval EFI_INVALID_PARAMETER  ProtocolBufferCount is NULL. \r
-  @retval EFI_OUT_OF_RESOURCES   There is not enough pool memory to store the \r
+  @param  UserHandle             The handle from which to retrieve the list of\r
+                                 protocol interface GUIDs.\r
+  @param  ProtocolBuffer         A pointer to the list of protocol interface GUID\r
+                                 pointers that are installed on Handle.\r
+  @param  ProtocolBufferCount    A pointer to the number of GUID pointers present\r
+                                 in ProtocolBuffer.\r
+\r
+  @retval EFI_SUCCESS            The list of protocol interface GUIDs installed\r
+                                 on Handle was returned in ProtocolBuffer. The\r
+                                 number of protocol interface GUIDs was returned\r
+                                 in ProtocolBufferCount.\r
+  @retval EFI_INVALID_PARAMETER  Handle is NULL.\r
+  @retval EFI_INVALID_PARAMETER  Handle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER  ProtocolBuffer is NULL.\r
+  @retval EFI_INVALID_PARAMETER  ProtocolBufferCount is NULL.\r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough pool memory to store the\r
                                  results.\r
 \r
 **/\r
@@ -1423,7 +1423,7 @@ CoreProtocolsPerHandle (
   ProtocolCount = 0;\r
 \r
   CoreAcquireProtocolLock ();\r
-  \r
+\r
   for (Link = Handle->Protocols.ForwardLink; Link != &Handle->Protocols; Link = Link->ForwardLink) {\r
     ProtocolCount++;\r
   }\r
@@ -1446,7 +1446,7 @@ CoreProtocolsPerHandle (
   *ProtocolBufferCount = ProtocolCount;\r
 \r
   for ( Link = Handle->Protocols.ForwardLink, ProtocolCount = 0;\r
-        Link != &Handle->Protocols; \r
+        Link != &Handle->Protocols;\r
         Link = Link->ForwardLink, ProtocolCount++) {\r
     Prot = CR(Link, PROTOCOL_INTERFACE, Link, PROTOCOL_INTERFACE_SIGNATURE);\r
     Buffer[ProtocolCount] = &(Prot->Protocol->ProtocolID);\r
@@ -1480,7 +1480,7 @@ CoreGetHandleDatabaseKey (
 /**\r
   Go connect any handles that were created or modified while a image executed.\r
 \r
-  @param  Key                    The Key to show that the handle has been \r
+  @param  Key                    The Key to show that the handle has been\r
                                  created/modified\r
 \r
 **/\r
@@ -1512,7 +1512,7 @@ CoreConnectHandlesByKey (
     CoreReleaseProtocolLock ();\r
     return;\r
   }\r
-  \r
+\r
   for (Link = gHandleList.ForwardLink, Count = 0; Link != &gHandleList; Link = Link->ForwardLink) {\r
     Handle = CR (Link, IHANDLE, AllHandles, EFI_HANDLE_SIGNATURE);\r
     if (Handle->Key > Key) {\r
@@ -1531,6 +1531,6 @@ CoreConnectHandlesByKey (
   for (Index = 0; Index < Count; Index++) {\r
     CoreConnectController (HandleBuffer[Index], NULL, NULL, TRUE);\r
   }\r
-  \r
+\r
   CoreFreePool(HandleBuffer);\r
 }\r