]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c
MdeModulePkg: Apply uncrustify changes
[mirror_edk2.git] / MdeModulePkg / Universal / FaultTolerantWriteDxe / FaultTolerantWriteDxe.c
index de38ea028af154eaa88e2eb8262d44450f3bbf6c..965dd3968e356250a7b3bcc903394240deef91c2 100644 (file)
@@ -47,8 +47,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include "FaultTolerantWrite.h"\r
-VOID                                      *mFvbRegistration = NULL;\r
-\r
+VOID  *mFvbRegistration = NULL;\r
 \r
 /**\r
   Retrieve the FVB protocol interface by HANDLE.\r
@@ -74,7 +73,7 @@ FtwGetFvbByHandle (
   return gBS->HandleProtocol (\r
                 FvBlockHandle,\r
                 &gEfiFirmwareVolumeBlockProtocolGuid,\r
-                (VOID **) FvBlock\r
+                (VOID **)FvBlock\r
                 );\r
 }\r
 \r
@@ -90,10 +89,10 @@ FtwGetFvbByHandle (
 **/\r
 EFI_STATUS\r
 FtwGetSarProtocol (\r
-  OUT VOID                                **SarProtocol\r
+  OUT VOID  **SarProtocol\r
   )\r
 {\r
-  EFI_STATUS                              Status;\r
+  EFI_STATUS  Status;\r
 \r
   //\r
   // Locate Swap Address Range protocol\r
@@ -123,11 +122,11 @@ FtwGetSarProtocol (
 **/\r
 EFI_STATUS\r
 GetFvbCountAndBuffer (\r
-  OUT UINTN                               *NumberHandles,\r
-  OUT EFI_HANDLE                          **Buffer\r
+  OUT UINTN       *NumberHandles,\r
+  OUT EFI_HANDLE  **Buffer\r
   )\r
 {\r
-  EFI_STATUS                              Status;\r
+  EFI_STATUS  Status;\r
 \r
   //\r
   // Locate all handles of Fvb protocol\r
@@ -142,7 +141,6 @@ GetFvbCountAndBuffer (
   return Status;\r
 }\r
 \r
-\r
 /**\r
   Firmware Volume Block Protocol notification event handler.\r
 \r
@@ -153,13 +151,13 @@ GetFvbCountAndBuffer (
 VOID\r
 EFIAPI\r
 FvbNotificationEvent (\r
-  IN  EFI_EVENT                           Event,\r
-  IN  VOID                                *Context\r
+  IN  EFI_EVENT  Event,\r
+  IN  VOID       *Context\r
   )\r
 {\r
-  EFI_STATUS                              Status;\r
-  EFI_FAULT_TOLERANT_WRITE_PROTOCOL       *FtwProtocol;\r
-  EFI_FTW_DEVICE                          *FtwDevice;\r
+  EFI_STATUS                         Status;\r
+  EFI_FAULT_TOLERANT_WRITE_PROTOCOL  *FtwProtocol;\r
+  EFI_FTW_DEVICE                     *FtwDevice;\r
 \r
   //\r
   // Just return to avoid installing FaultTolerantWriteProtocol again\r
@@ -168,19 +166,19 @@ FvbNotificationEvent (
   Status = gBS->LocateProtocol (\r
                   &gEfiFaultTolerantWriteProtocolGuid,\r
                   NULL,\r
-                  (VOID **) &FtwProtocol\r
+                  (VOID **)&FtwProtocol\r
                   );\r
   if (!EFI_ERROR (Status)) {\r
-    return ;\r
+    return;\r
   }\r
 \r
   //\r
   // Found proper FVB protocol and initialize FtwDevice for protocol installation\r
   //\r
   FtwDevice = (EFI_FTW_DEVICE *)Context;\r
-  Status = InitFtwProtocol (FtwDevice);\r
-  if (EFI_ERROR(Status)) {\r
-    return ;\r
+  Status    = InitFtwProtocol (FtwDevice);\r
+  if (EFI_ERROR (Status)) {\r
+    return;\r
   }\r
 \r
   //\r
@@ -200,7 +198,6 @@ FvbNotificationEvent (
   return;\r
 }\r
 \r
-\r
 /**\r
   This function is the entry point of the Fault Tolerant Write driver.\r
 \r
@@ -215,12 +212,12 @@ FvbNotificationEvent (
 EFI_STATUS\r
 EFIAPI\r
 FaultTolerantWriteInitialize (\r
-  IN EFI_HANDLE                           ImageHandle,\r
-  IN EFI_SYSTEM_TABLE                     *SystemTable\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
 {\r
-  EFI_STATUS                              Status;\r
-  EFI_FTW_DEVICE                          *FtwDevice;\r
+  EFI_STATUS      Status;\r
+  EFI_FTW_DEVICE  *FtwDevice;\r
 \r
   FtwDevice = NULL;\r
 \r
@@ -228,7 +225,7 @@ FaultTolerantWriteInitialize (
   // Allocate private data structure for FTW protocol and do some initialization\r
   //\r
   Status = InitFtwDevice (&FtwDevice);\r
-  if (EFI_ERROR(Status)) {\r
+  if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
 \r
@@ -263,12 +260,12 @@ FaultTolerantWriteInitialize (
 **/\r
 UINT32\r
 FtwCalculateCrc32 (\r
-  IN  VOID                         *Buffer,\r
-  IN  UINTN                        Length\r
+  IN  VOID   *Buffer,\r
+  IN  UINTN  Length\r
   )\r
 {\r
-  EFI_STATUS    Status;\r
-  UINT32        ReturnValue;\r
+  EFI_STATUS  Status;\r
+  UINT32      ReturnValue;\r
 \r
   Status = gBS->CalculateCrc32 (Buffer, Length, &ReturnValue);\r
   ASSERT_EFI_ERROR (Status);\r