diff options
author | Hao Wu <hao.a.wu@intel.com> | 2017-04-21 10:38:57 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-07-12 11:24:25 +0800 |
commit | ddab7afdb6f130dc2e5c5a58e66a820602300ed4 (patch) | |
tree | 418812b03e821655a66b066a35929fbfc0e1790d | |
parent | 915064f08532fec87bec89438cd831a8708b0213 (diff) | |
download | edk2-platforms-ddab7afdb6f130dc2e5c5a58e66a820602300ed4.tar.xz |
MdeModulePkg/PiSmmCore: Remove redundant PoolTail pointer assignment
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
(cherry picked from commit f8f931f632f7d7ff12a1cfdec36ebefe19085e83)
-rw-r--r-- | Core/MdeModulePkg/Core/PiSmmCore/Pool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Core/MdeModulePkg/Core/PiSmmCore/Pool.c b/Core/MdeModulePkg/Core/PiSmmCore/Pool.c index ebb9f8c49e..36317563c4 100644 --- a/Core/MdeModulePkg/Core/PiSmmCore/Pool.c +++ b/Core/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);
}
/**
|