]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c
Vlv2TbltDevicePkg/FvbRuntimeDxe: correct NumOfLba vararg type in EraseBlocks()
[mirror_edk2.git] / Vlv2TbltDevicePkg / FvbRuntimeDxe / FvbService.c
index 7c95c107e6008f66277ce297326ee637e6ed5be8..89b9410424201b94c0dc04a4225cce667b52adef 100644 (file)
@@ -356,12 +356,9 @@ FvbWriteBlock (
   EFI_FVB_ATTRIBUTES_2                    Attributes;\r
   UINTN                                   LbaAddress;\r
   UINTN                                   LbaLength;\r
-  EFI_FW_VOL_INSTANCE                     *FwhInstance;\r
   EFI_STATUS                              Status;\r
   EFI_STATUS                              Status1;\r
 \r
-  FwhInstance = GetFvbInstance (Instance);\r
-\r
   if ( (NumBytes == NULL) || (Buffer == NULL)) {\r
     return (EFI_INVALID_PARAMETER);\r
   }\r
@@ -436,15 +433,9 @@ FvbEraseBlock (
 {\r
   EFI_FVB_ATTRIBUTES_2                    Attributes;\r
   UINTN                                   LbaAddress;\r
-  EFI_FW_VOL_INSTANCE                     *FwhInstance;\r
   UINTN                                   LbaLength;\r
   EFI_STATUS                              Status;\r
 \r
-  //\r
-  // Find the right instance of the FVB private data.\r
-  //\r
-  FwhInstance = GetFvbInstance (Instance);\r
-\r
   //\r
   // Check if the FV is write enabled.\r
   //\r
@@ -802,7 +793,7 @@ FvbProtocolEraseBlocks (
       break;\r
     }\r
 \r
-    NumOfLba = VA_ARG (args, UINT32);\r
+    NumOfLba = VA_ARG (args, UINTN);\r
 \r
     //\r
     // Check input parameters.\r
@@ -826,7 +817,7 @@ FvbProtocolEraseBlocks (
       break;\r
     }\r
 \r
-    NumOfLba = VA_ARG (args, UINT32);\r
+    NumOfLba = VA_ARG (args, UINTN);\r
 \r
     while ( NumOfLba > 0 ) {\r
       Status = FvbEraseBlock (FvbDevice->Instance, StartingLba);\r
@@ -1016,7 +1007,6 @@ FvbInitialize (
   UINTN                                 TmpHeaderLength;\r
   UINTN                                 Idx;\r
   UINT32                                MaxLbaSize;\r
-  BOOLEAN                               FvHeaderValid;\r
 \r
   //\r
   // Calculate the total size for all firmware volume block instances.\r
@@ -1043,7 +1033,6 @@ FvbInitialize (
     FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) BaseAddress;\r
 \r
     if (!IsFvHeaderValid (BaseAddress, FwVolHeader)) {\r
-      FvHeaderValid = FALSE;\r
       //\r
       // If not valid, get FvbInfo from the information carried in\r
       // FVB driver.\r