public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/PiSmmCore: Remove redundant PoolTail pointer assignment
@ 2017-04-21  2:44 Hao Wu
  2017-04-21  2:51 ` Zeng, Star
  0 siblings, 1 reply; 2+ messages in thread
From: Hao Wu @ 2017-04-21  2:44 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu, Star Zeng, Jiewen Yao

Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Core/PiSmmCore/Pool.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c b/MdeModulePkg/Core/PiSmmCore/Pool.c
index ebb9f8c49e..36317563c4 100644
--- a/MdeModulePkg/Core/PiSmmCore/Pool.c
+++ b/MdeModulePkg/Core/PiSmmCore/Pool.c
@@ -185,18 +185,19 @@ InternalAllocPoolByIndex (
   Internal Function. Free a pool by specified PoolIndex.
 
   @param  FreePoolHdr           The pool to free.
+  @param  PoolTail              The pointer to the pool tail.
 
   @retval EFI_SUCCESS           Pool successfully freed.
 
 **/
 EFI_STATUS
 InternalFreePoolByIndex (
-  IN FREE_POOL_HEADER  *FreePoolHdr
+  IN FREE_POOL_HEADER  *FreePoolHdr,
+  IN POOL_TAIL         *PoolTail
   )
 {
   UINTN                 PoolIndex;
   SMM_POOL_TYPE         SmmPoolType;
-  POOL_TAIL             *PoolTail;
 
   ASSERT ((FreePoolHdr->Header.Size & (FreePoolHdr->Header.Size - 1)) == 0);
   ASSERT (((UINTN)FreePoolHdr & (FreePoolHdr->Header.Size - 1)) == 0);
@@ -208,7 +209,6 @@ InternalFreePoolByIndex (
   FreePoolHdr->Header.Signature = 0;
   FreePoolHdr->Header.Available = TRUE;
   FreePoolHdr->Header.Type = 0;
-  PoolTail = HEAD_TO_TAIL(&FreePoolHdr->Header);
   PoolTail->Signature = 0;
   PoolTail->Size = 0;
   ASSERT (PoolIndex < MAX_POOL_INDEX);
@@ -373,7 +373,7 @@ SmmInternalFreePool (
              EFI_SIZE_TO_PAGES (FreePoolHdr->Header.Size)
              );
   }
-  return InternalFreePoolByIndex (FreePoolHdr);
+  return InternalFreePoolByIndex (FreePoolHdr, PoolTail);
 }
 
 /**
-- 
2.12.0.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-21  2:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-21  2:44 [PATCH] MdeModulePkg/PiSmmCore: Remove redundant PoolTail pointer assignment Hao Wu
2017-04-21  2:51 ` Zeng, Star

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox