public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zeng, Star" <star.zeng@intel.com>
To: "Wu, Hao A" <hao.a.wu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Yao, Jiewen" <jiewen.yao@intel.com>, "Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH] MdeModulePkg/PiSmmCore: Remove redundant PoolTail pointer assignment
Date: Fri, 21 Apr 2017 02:51:16 +0000	[thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B87D027@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20170421024451.15584-1-hao.a.wu@intel.com>

Reviewed-by: Star Zeng <star.zeng@intel.com>

-----Original Message-----
From: Wu, Hao A 
Sent: Friday, April 21, 2017 10:45 AM
To: edk2-devel@lists.01.org
Cc: Wu, Hao A <hao.a.wu@intel.com>; Zeng, Star <star.zeng@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
Subject: [PATCH] MdeModulePkg/PiSmmCore: Remove redundant PoolTail pointer assignment

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



      reply	other threads:[~2017-04-21  2:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21  2:44 [PATCH] MdeModulePkg/PiSmmCore: Remove redundant PoolTail pointer assignment Hao Wu
2017-04-21  2:51 ` Zeng, Star [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0C09AFA07DD0434D9E2A0C6AEB0483103B87D027@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox