]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c
UefiCpuPkg: Refine casting expression result to bigger size
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / SmramSaveState.c
index b4bc0ec6a53de92c813d01fe7eb1a13b0abfbff9..3188d438181ccbed40e9d981e62dd4b8dfe792a9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Provides services to access SMRAM Save State Map\r
 \r
-Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 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
@@ -690,7 +690,7 @@ InstallSmiHandler (
   //\r
   // Initialize PROCESSOR_SMM_DESCRIPTOR\r
   //\r
-  Psd = (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)(UINTN)(SmBase + SMM_PSD_OFFSET);\r
+  Psd = (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)((UINTN)SmBase + SMM_PSD_OFFSET);\r
   CopyMem (Psd, &gcPsd, sizeof (gcPsd));\r
   Psd->SmmGdtPtr = (UINT64)GdtBase;\r
   Psd->SmmGdtSize = (UINT32)GdtSize;\r
@@ -731,7 +731,7 @@ InstallSmiHandler (
   // Copy template to CPU specific SMI handler location\r
   //\r
   CopyMem (\r
-    (VOID*)(UINTN)(SmBase + SMM_HANDLER_OFFSET),\r
+    (VOID*)((UINTN)SmBase + SMM_HANDLER_OFFSET),\r
     (VOID*)gcSmiHandlerTemplate,\r
     gcSmiHandlerSize\r
     );\r