]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/FwVol/FwVol.c
Code scrub for DxeCore
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / FwVol / FwVol.c
index 6a4d7b05b2abe521dcf4b39854de73ca7a932980..f14cce05c7c820e1983c84df0409eda9fbe172fd 100644 (file)
@@ -52,8 +52,6 @@ FV_DEVICE mFvDevice = {
 //\r
 // FFS helper functions\r
 //\r
-\r
-\r
 /**\r
   given the supplied FW_VOL_BLOCK_PROTOCOL, allocate a buffer for output and\r
   copy the volume header into it.\r
@@ -122,8 +120,6 @@ GetFwVolHeader (
 \r
   @param  FvDevice              pointer to the FvDevice to be freed. \r
 \r
-  @return None.\r
-\r
 **/\r
 VOID\r
 FreeFvDeviceResource (\r
@@ -149,7 +145,7 @@ FreeFvDeviceResource (
 \r
     CoreFreePool (FfsFileEntry);\r
 \r
-    FfsFileEntry = (FFS_FILE_LIST_ENTRY *)NextEntry;\r
+    FfsFileEntry = (FFS_FILE_LIST_ENTRY *) NextEntry;\r
   }\r
 \r
 \r
@@ -169,9 +165,9 @@ FreeFvDeviceResource (
 \r
 \r
 /**\r
-  Check if a FV is consistent and allocate cache\r
+  Check if an FV is consistent and allocate cache for it.\r
 \r
-  @param  FvDevice              pointer to the FvDevice to be checked. \r
+  @param  FvDevice              pointer to the FvDevice to be checked. \r
 \r
   @retval EFI_OUT_OF_RESOURCES  No enough buffer could be allocated. \r
   @retval EFI_SUCCESS           FV is consistent and cache is allocated. \r
@@ -245,11 +241,11 @@ FvCheck (
         Size -= LbaOffset;\r
       }\r
       Status = Fvb->Read (Fvb,\r
-                          LbaIndex,\r
-                          LbaOffset,\r
-                          &Size,\r
-                          CacheLocation\r
-                          );\r
+                      LbaIndex,\r
+                      LbaOffset,\r
+                      &Size,\r
+                      CacheLocation\r
+                      );\r
       //\r
       // Not check EFI_BAD_BUFFER_SIZE, for Size = BlockMap->Length\r
       //\r
@@ -288,11 +284,11 @@ FvCheck (
   //\r
   // Build FFS list\r
   //\r
-  FfsHeader = (EFI_FFS_FILE_HEADER *)FvDevice->CachedFv;\r
+  FfsHeader = (EFI_FFS_FILE_HEADER *) FvDevice->CachedFv;\r
   TopFvAddress = FvDevice->EndOfCachedFv;\r
-  while ((UINT8 *)FfsHeader < TopFvAddress) {\r
+  while ((UINT8 *) FfsHeader < TopFvAddress) {\r
 \r
-    TestLength = TopFvAddress - ((UINT8 *)FfsHeader);\r
+    TestLength = TopFvAddress - ((UINT8 *) FfsHeader);\r
     if (TestLength > sizeof (EFI_FFS_FILE_HEADER)) {\r
       TestLength = sizeof (EFI_FFS_FILE_HEADER);\r
     }\r
@@ -308,9 +304,7 @@ FvCheck (
       if ((FileState == EFI_FILE_HEADER_INVALID) || \r
           (FileState == EFI_FILE_HEADER_CONSTRUCTION)) {\r
         FfsHeader++;\r
-      \r
         continue;\r
-      \r
       } else {\r
         //\r
         // File system is corrputed\r
@@ -476,9 +470,9 @@ NotifyFwVolBlock (
         return;\r
       }\r
       \r
-      FvDevice->Fvb         = Fvb;\r
-      FvDevice->Handle      = Handle;\r
-      FvDevice->FwVolHeader = FwVolHeader;\r
+      FvDevice->Fvb             = Fvb;\r
+      FvDevice->Handle          = Handle;\r
+      FvDevice->FwVolHeader     = FwVolHeader;\r
       FvDevice->Fv.ParentHandle = Fvb->ParentHandle;\r
       \r
       //\r