From nobody Sat Nov 2 08:36:17 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1492742699484620.2394601407162; Thu, 20 Apr 2017 19:44:59 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 226E721954074; Thu, 20 Apr 2017 19:44:57 -0700 (PDT) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 C75422195406F for ; Thu, 20 Apr 2017 19:44:55 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Apr 2017 19:44:55 -0700 Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.13]) by fmsmga001.fm.intel.com with ESMTP; 20 Apr 2017 19:44:54 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,228,1488873600"; d="scan'208";a="1138391481" From: Hao Wu To: edk2-devel@lists.01.org Date: Fri, 21 Apr 2017 10:44:51 +0800 Message-Id: <20170421024451.15584-1-hao.a.wu@intel.com> X-Mailer: git-send-email 2.12.0.windows.1 Subject: [edk2] [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: , Cc: Hao Wu , Jiewen Yao , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Star Zeng Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Star Zeng --- 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 /** --=20 2.12.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel