]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Hand/Handle.c
Add VA_END to end the VA_START.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Hand / Handle.c
index cfa103c0e5bcac1f01e2f3baa22137516a79c886..38e27c4dfd5f9fa64432b39670940da19e438bb8 100644 (file)
@@ -370,7 +370,7 @@ CoreInstallProtocolInterfaceNotify (
   Prot = NULL;\r
   Handle = NULL;\r
 \r
-  if (*UserHandle != NULL_HANDLE) {\r
+  if (*UserHandle != NULL) {\r
     Status = CoreHandleProtocol (*UserHandle, Protocol, (VOID **)&ExistingInterface);\r
     if (!EFI_ERROR (Status)) {\r
       return EFI_INVALID_PARAMETER;\r
@@ -564,7 +564,7 @@ CoreInstallMultipleProtocolInterfaces (
       DeviceHandle = NULL;\r
       DevicePath   = Interface;\r
       Status = CoreLocateDevicePath (&gEfiDevicePathProtocolGuid, &DevicePath, &DeviceHandle);\r
-      if (!EFI_ERROR (Status) && (DeviceHandle != NULL_HANDLE) && IsDevicePathEnd(DevicePath)) {\r
+      if (!EFI_ERROR (Status) && (DeviceHandle != NULL) && IsDevicePathEnd(DevicePath)) {\r
         Status = EFI_ALREADY_STARTED;\r
         continue;\r
       }\r
@@ -575,6 +575,7 @@ CoreInstallMultipleProtocolInterfaces (
     //\r
     Status = CoreInstallProtocolInterface (Handle, Protocol, EFI_NATIVE_INTERFACE, Interface);\r
   }\r
+  VA_END (Args);\r
 \r
   //\r
   // If there was an error, remove all the interfaces that were installed without any errors\r
@@ -589,6 +590,8 @@ CoreInstallMultipleProtocolInterfaces (
       Interface = VA_ARG (Args, VOID *);\r
       CoreUninstallProtocolInterface (*Handle, Protocol, Interface);\r
     }\r
+    VA_END (Args);\r
+    \r
     *Handle = OldHandle;\r
   }\r
 \r
@@ -844,6 +847,7 @@ CoreUninstallMultipleProtocolInterfaces (
     //\r
     Status = CoreUninstallProtocolInterface (Handle, Protocol, Interface);\r
   }\r
+  VA_END (Args);\r
 \r
   //\r
   // If there was an error, add all the interfaces that were\r
@@ -859,6 +863,7 @@ CoreUninstallMultipleProtocolInterfaces (
       Interface = VA_ARG(Args, VOID *);\r
       CoreInstallProtocolInterface (&Handle, Protocol, EFI_NATIVE_INTERFACE, Interface);\r
     }\r
+    VA_END (Args);\r
   }\r
 \r
   return Status;\r
@@ -916,7 +921,11 @@ CoreGetProtocolInterface (
   @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
+  @retval EFI_SUCCESS            The interface information for the specified protocol was returned.\r
+  @retval EFI_UNSUPPORTED        The device does not support the specified protocol.\r
+  @retval EFI_INVALID_PARAMETER  Handle is not a valid EFI_HANDLE..\r
+  @retval EFI_INVALID_PARAMETER  Protocol is NULL.\r
+  @retval EFI_INVALID_PARAMETER  Interface is NULL.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1219,7 +1228,7 @@ CoreCloseProtocol (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  if (ControllerHandle != NULL_HANDLE) {\r
+  if (ControllerHandle != NULL) {\r
     Status = CoreValidateHandle (ControllerHandle);\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
@@ -1274,11 +1283,15 @@ Done:
 \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  EntryBuffer            A pointer to a buffer of open protocol information in the\r
+                                 form of EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.\r
   @param  EntryCount             Number of EntryBuffer entries\r
 \r
+  @retval EFI_SUCCESS            The open protocol information was returned in EntryBuffer, \r
+                                 and the number of entries was returned EntryCount.\r
+  @retval EFI_NOT_FOUND          Handle does not support the protocol specified by Protocol.\r
+  @retval EFI_OUT_OF_RESOURCES   There are not enough resources available to allocate EntryBuffer.\r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r