From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 B2F3E81E63 for ; Mon, 14 Nov 2016 18:28:53 -0800 (PST) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 117AF37E72; Tue, 15 Nov 2016 02:28:58 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-50.phx2.redhat.com [10.3.116.50]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAF2Su0Y031639; Mon, 14 Nov 2016 21:28:57 -0500 To: Jeff Fan , edk2-devel@ml01.01.org References: <20161115021839.3984-1-jeff.fan@intel.com> Cc: Feng Tian , Michael D Kinney From: Laszlo Ersek Message-ID: <5bdaef72-6f48-68fd-91d7-671e64544737@redhat.com> Date: Tue, 15 Nov 2016 03:28:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161115021839.3984-1-jeff.fan@intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 15 Nov 2016 02:28:58 +0000 (UTC) Subject: Re: [PATCH] UefiCpuPkg/DxeMpLib: Remove sizeof() that is not necessary X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2016 02:28:53 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 11/15/16 03:18, Jeff Fan wrote: > Reported at https://lists.01.org/pipermail/edk2-devel/2016-November/004685.html > > Reported-by: Laszlo Ersek > Cc: Laszlo Ersek > Cc: Feng Tian > Cc: Michael D Kinney > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jeff Fan > --- > UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c > index 7f3900b..dcc9134 100644 > --- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c > +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c > @@ -311,7 +311,7 @@ InitMpGlobalData ( > Status = gBS->AllocatePages ( > AllocateMaxAddress, > EfiReservedMemoryType, > - EFI_SIZE_TO_PAGES (sizeof (CpuMpData->AddressMap.RelocateApLoopFuncSize)), > + EFI_SIZE_TO_PAGES (CpuMpData->AddressMap.RelocateApLoopFuncSize), > &Address > ); > ASSERT_EFI_ERROR (Status); > Looks good to me; the RelocateApLoopFuncSize field even has type UINTN, which is what EFI_SIZE_TO_PAGES wants. Reviewed-by: Laszlo Ersek Thanks! Laszlo