]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c
MdeModulePkg: Apply uncrustify changes
[mirror_edk2.git] / MdeModulePkg / Library / UefiBootManagerLib / BmConnect.c
index d4a263b8fe23a9a48f5e67e88e08880922dc93e7..d1fb0f72ba888146b1aacb610afa29023cb018df 100644 (file)
@@ -52,7 +52,6 @@ BmConnectAllDriversToAllControllers (
     // the connect again.\r
     //\r
     Status = gDS->Dispatch ();\r
-\r
   } while (!EFI_ERROR (Status));\r
 }\r
 \r
@@ -154,7 +153,6 @@ EfiBootManagerConnectDevicePath (
         }\r
       }\r
 \r
-\r
       if (!EFI_ERROR (Status)) {\r
         PreviousHandle = Handle;\r
         //\r
@@ -175,11 +173,13 @@ EfiBootManagerConnectDevicePath (
         if (Status == EFI_NOT_FOUND) {\r
           Status = EFI_SUCCESS;\r
         }\r
+\r
         if (MatchingHandle != NULL) {\r
           *MatchingHandle = Handle;\r
         }\r
       }\r
     }\r
+\r
     //\r
     // Loop until RemainingDevicePath is an empty device path\r
     //\r
@@ -243,16 +243,16 @@ EfiBootManagerDisconnectAll (
 **/\r
 EFI_STATUS\r
 BmConnectUsbShortFormDevicePath (\r
-  IN EFI_DEVICE_PATH_PROTOCOL   *DevicePath\r
+  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
   )\r
 {\r
-  EFI_STATUS                            Status;\r
-  EFI_HANDLE                            *Handles;\r
-  UINTN                                 HandleCount;\r
-  UINTN                                 Index;\r
-  EFI_PCI_IO_PROTOCOL                   *PciIo;\r
-  UINT8                                 Class[3];\r
-  BOOLEAN                               AtLeastOneConnected;\r
+  EFI_STATUS           Status;\r
+  EFI_HANDLE           *Handles;\r
+  UINTN                HandleCount;\r
+  UINTN                Index;\r
+  EFI_PCI_IO_PROTOCOL  *PciIo;\r
+  UINT8                Class[3];\r
+  BOOLEAN              AtLeastOneConnected;\r
 \r
   //\r
   // Check the passed in parameters\r
@@ -263,7 +263,8 @@ BmConnectUsbShortFormDevicePath (
 \r
   if ((DevicePathType (DevicePath) != MESSAGING_DEVICE_PATH) ||\r
       ((DevicePathSubType (DevicePath) != MSG_USB_CLASS_DP) && (DevicePathSubType (DevicePath) != MSG_USB_WWID_DP))\r
-     ) {\r
+      )\r
+  {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -271,19 +272,19 @@ BmConnectUsbShortFormDevicePath (
   // Find the usb host controller firstly, then connect with the remaining device path\r
   //\r
   AtLeastOneConnected = FALSE;\r
-  Status = gBS->LocateHandleBuffer (\r
-                  ByProtocol,\r
-                  &gEfiPciIoProtocolGuid,\r
-                  NULL,\r
-                  &HandleCount,\r
-                  &Handles\r
-                  );\r
+  Status              = gBS->LocateHandleBuffer (\r
+                               ByProtocol,\r
+                               &gEfiPciIoProtocolGuid,\r
+                               NULL,\r
+                               &HandleCount,\r
+                               &Handles\r
+                               );\r
   if (!EFI_ERROR (Status)) {\r
     for (Index = 0; Index < HandleCount; Index++) {\r
       Status = gBS->HandleProtocol (\r
                       Handles[Index],\r
                       &gEfiPciIoProtocolGuid,\r
-                      (VOID **) &PciIo\r
+                      (VOID **)&PciIo\r
                       );\r
       if (!EFI_ERROR (Status)) {\r
         //\r
@@ -292,14 +293,15 @@ BmConnectUsbShortFormDevicePath (
         Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0x09, 3, &Class);\r
         if (!EFI_ERROR (Status) &&\r
             ((PCI_CLASS_SERIAL == Class[2]) && (PCI_CLASS_SERIAL_USB == Class[1]))\r
-           ) {\r
+            )\r
+        {\r
           Status = gBS->ConnectController (\r
                           Handles[Index],\r
                           NULL,\r
                           DevicePath,\r
                           FALSE\r
                           );\r
-          if (!EFI_ERROR(Status)) {\r
+          if (!EFI_ERROR (Status)) {\r
             AtLeastOneConnected = TRUE;\r
           }\r
         }\r