]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c
MdeModulePkg: Refine type cast for pointer subtraction
[mirror_edk2.git] / MdeModulePkg / Universal / FaultTolerantWriteDxe / FaultTolerantWrite.c
index 7a6c377854d82240e906441a473890282734b1c7..49e747b9016bd41fe2894d875ca4edc98d0cf6ea 100644 (file)
@@ -3,7 +3,7 @@
   These are the common Fault Tolerant Write (FTW) functions that are shared \r
   by DXE FTW driver and SMM FTW driver.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, 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
@@ -373,7 +373,7 @@ FtwWrite (
   //\r
   // If Record is out of the range of Header, return access denied.\r
   //\r
-  if (((UINTN)((UINT8 *) Record - (UINT8 *) Header)) > FTW_WRITE_TOTAL_SIZE (Header->NumberOfWrites - 1, Header->PrivateDataSize)) {\r
+  if (((UINTN) Record - (UINTN) Header) > FTW_WRITE_TOTAL_SIZE (Header->NumberOfWrites - 1, Header->PrivateDataSize)) {\r
     return EFI_ACCESS_DENIED;\r
   }\r
 \r
@@ -720,7 +720,7 @@ FtwRestart (
     return EFI_ABORTED;\r
   }\r
 \r
-  DEBUG ((EFI_D_ERROR, "Ftw: Restart() success \n"));\r
+  DEBUG ((EFI_D_INFO, "%a(): success\n", __FUNCTION__));\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -775,7 +775,7 @@ FtwAbort (
 \r
   FtwDevice->FtwLastWriteHeader->Complete = FTW_VALID_STATE;\r
 \r
-  DEBUG ((EFI_D_ERROR, "Ftw: Abort() success \n"));\r
+  DEBUG ((EFI_D_INFO, "%a(): success\n", __FUNCTION__));\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -886,7 +886,7 @@ FtwGetLastWrite (
     Status = EFI_SUCCESS;\r
   }\r
 \r
-  DEBUG ((EFI_D_ERROR, "Ftw: GetLasetWrite() success\n"));\r
+  DEBUG ((EFI_D_INFO, "%a(): success\n", __FUNCTION__));\r
 \r
   return Status;\r
 }\r