]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / FaultTolerantWriteDxe / FtwMisc.c
index 96044693ccaea3d8cce85018a1fbff395e55ef18..27b65366ef1d5e9a63dac735977378edeeeb9fe6 100644 (file)
@@ -2,14 +2,14 @@
 \r
   Internal generic functions to operate flash block.\r
 \r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -89,7 +89,7 @@ FtwEraseBlock (
                                 partially erased.\r
   @retval EFI_INVALID_PARAMETER One or more of the LBAs listed\r
                                 in the variable argument list do\r
-                                not exist in the firmware volume.  \r
+                                not exist in the firmware volume.\r
 \r
 \r
 **/\r
@@ -970,11 +970,11 @@ GetPreviousRecordOfWrites (
 **/\r
 EFI_STATUS\r
 InitFtwDevice (\r
-  OUT EFI_FTW_DEVICE               **FtwData \r
+  OUT EFI_FTW_DEVICE               **FtwData\r
   )\r
 {\r
   EFI_FTW_DEVICE                   *FtwDevice;\r
-  \r
+\r
   //\r
   // Allocate private data of this driver,\r
   // Including the FtwWorkSpace[FTW_WORK_SPACE_SIZE].\r
@@ -1005,11 +1005,11 @@ InitFtwDevice (
   if (FtwDevice->WorkSpaceAddress == 0) {\r
     FtwDevice->WorkSpaceAddress = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageFtwWorkingBase);\r
   }\r
-  \r
+\r
   FtwDevice->SpareAreaAddress = (EFI_PHYSICAL_ADDRESS) PcdGet64 (PcdFlashNvStorageFtwSpareBase64);\r
   if (FtwDevice->SpareAreaAddress == 0) {\r
     FtwDevice->SpareAreaAddress = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageFtwSpareBase);\r
-  }  \r
+  }\r
 \r
   *FtwData = FtwDevice;\r
   return EFI_SUCCESS;\r
@@ -1024,7 +1024,7 @@ InitFtwDevice (
   @retval EFI_SUCCESS           Find the FVB protocol successfully.\r
   @retval EFI_NOT_FOUND         No proper FVB protocol was found.\r
   @retval EFI_ABORTED           Some data can not be got or be invalid.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 FindFvbForFtw (\r
@@ -1068,7 +1068,7 @@ FindFvbForFtw (
     //\r
     Status = Fvb->GetAttributes (Fvb, &Attributes);\r
     if (EFI_ERROR (Status) || ((Attributes & EFI_FVB2_WRITE_STATUS) == 0)) {\r
-      continue;     \r
+      continue;\r
     }\r
     //\r
     // Compare the address and select the right one\r
@@ -1188,7 +1188,7 @@ FindFvbForFtw (
 \r
   @retval EFI_SUCCESS           Initialize the FTW protocol successfully.\r
   @retval EFI_NOT_FOUND         No proper FVB protocol was found.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 InitFtwProtocol (\r
@@ -1208,7 +1208,7 @@ InitFtwProtocol (
   Status = FindFvbForFtw (FtwDevice);\r
   if (EFI_ERROR (Status)) {\r
     return EFI_NOT_FOUND;\r
-  }  \r
+  }\r
 \r
   //\r
   // Calculate the start LBA of working block.\r
@@ -1338,7 +1338,7 @@ InitFtwProtocol (
   if (FtwDevice->FtwWorkSpace[Offset] != FTW_ERASED_BYTE) {\r
     Offset += FTW_WRITE_TOTAL_SIZE (FtwHeader->NumberOfWrites, FtwHeader->PrivateDataSize);\r
   }\r
-  \r
+\r
   if (!IsErasedFlashBuffer (FtwDevice->FtwWorkSpace + Offset, FtwDevice->FtwWorkSpaceSize - Offset)) {\r
     Status = FtwReclaimWorkSpace (FtwDevice, TRUE);\r
     ASSERT_EFI_ERROR (Status);\r
@@ -1378,7 +1378,7 @@ InitFtwProtocol (
   FtwDevice->FtwInstance.Restart         = FtwRestart;\r
   FtwDevice->FtwInstance.Abort           = FtwAbort;\r
   FtwDevice->FtwInstance.GetLastWrite    = FtwGetLastWrite;\r
-    \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r