diff options
author | Hao Wu <hao.a.wu@intel.com> | 2017-04-21 10:38:57 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2017-04-24 08:58:07 +0800 |
commit | f8f931f632f7d7ff12a1cfdec36ebefe19085e83 (patch) | |
tree | 137a0ca59fa9942ade157766e506d20e209c8157 /MdeModulePkg/Core/PiSmmCore | |
parent | 205a4b0c15372c004a947b6873f711805415f542 (diff) | |
download | edk2-f8f931f632f7d7ff12a1cfdec36ebefe19085e83.tar.gz edk2-f8f931f632f7d7ff12a1cfdec36ebefe19085e83.tar.bz2 edk2-f8f931f632f7d7ff12a1cfdec36ebefe19085e83.zip |
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>
Diffstat (limited to 'MdeModulePkg/Core/PiSmmCore')
-rw-r--r-- | MdeModulePkg/Core/PiSmmCore/Pool.c | 8 |
1 files 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);
}
/**
|