From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DCADA2194EB4B for ; Thu, 20 Apr 2017 19:51:19 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP; 20 Apr 2017 19:51:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,228,1488873600"; d="scan'208";a="90465975" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 20 Apr 2017 19:51:19 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 20 Apr 2017 19:51:19 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 20 Apr 2017 19:51:18 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0319.002; Fri, 21 Apr 2017 10:51:16 +0800 From: "Zeng, Star" To: "Wu, Hao A" , "edk2-devel@lists.01.org" CC: "Yao, Jiewen" , "Zeng, Star" Thread-Topic: [PATCH] MdeModulePkg/PiSmmCore: Remove redundant PoolTail pointer assignment Thread-Index: AQHSuklHr6dJprpT0kS5fYZd9MhI4KHPH6KA Date: Fri, 21 Apr 2017 02:51:16 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B87D027@shsmsx102.ccr.corp.intel.com> References: <20170421024451.15584-1-hao.a.wu@intel.com> In-Reply-To: <20170421024451.15584-1-hao.a.wu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/PiSmmCore: Remove redundant PoolTail pointer assignment X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2017 02:51:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng -----Original Message----- From: Wu, Hao A=20 Sent: Friday, April 21, 2017 10:45 AM To: edk2-devel@lists.01.org Cc: Wu, Hao A ; Zeng, Star ; Yao, = Jiewen Subject: [PATCH] MdeModulePkg/PiSmmCore: Remove redundant PoolTail pointer = assignment Cc: Star Zeng Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- MdeModulePkg/Core/PiSmmCore/Pool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c b/MdeModulePkg/Core/PiSmmCo= re/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. =20 @param FreePoolHdr The pool to free. + @param PoolTail The pointer to the pool tail. =20 @retval EFI_SUCCESS Pool successfully freed. =20 **/ 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; =20 ASSERT ((FreePoolHdr->Header.Size & (FreePoolHdr->Header.Size - 1)) =3D= =3D 0); ASSERT (((UINTN)FreePoolHdr & (FreePoolHdr->Header.Size - 1)) =3D=3D 0);= @@ -208,7 +209,6 @@ InternalFreePoolByIndex ( FreePoolHdr->Header.Signature =3D 0; FreePoolHdr->Header.Available =3D TRUE; FreePoolHdr->Header.Type =3D 0; - PoolTail =3D HEAD_TO_TAIL(&FreePoolHdr->Header); PoolTail->Signature =3D 0; PoolTail->Size =3D 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); } =20 /** -- 2.12.0.windows.1