From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.2408.1613005517717253365 for ; Wed, 10 Feb 2021 17:05:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=eCjItO+u; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [10.124.238.202] (unknown [131.107.174.202]) by linux.microsoft.com (Postfix) with ESMTPSA id 453A120B6C40; Wed, 10 Feb 2021 17:05:17 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 453A120B6C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1613005517; bh=qYDQdlpnf3iRyC2VqsMmCGLW8FAd4XMiePn0X3Epn4A=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=eCjItO+u3IQte+ViK214tACzaGYhprZ7PmjmGewV8nLch2/IaJElBwyr0sI8bFmJH SSe4B1oPTwGSQ1maa1VZMkhtRukr73L0UJSOv9Kdwguk55lVU04JAQTGu5QYHDzIqn 6JCZR25DMSTYlVuOtdrJRNjxxEMWp5cqrjahFhPk= Subject: Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg/StandaloneMmCore: Fix compiler warning To: devel@edk2.groups.io, ardb@kernel.org Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Supreeth Venkatesh References: <20210203035052.402-1-mikuback@linux.microsoft.com> From: "Michael Kubacki" Message-ID: <75e47645-febe-99fe-03a3-d67553f71825@linux.microsoft.com> Date: Wed, 10 Feb 2021 17:05:17 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Ard, V2 is now on the list. Thanks, Michael On 2/10/2021 2:30 PM, Ard Biesheuvel wrote: > On Wed, 3 Feb 2021 at 04:51, wrote: >> >> From: Michael Kubacki >> >> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3204 >> >> Fixes the following compiler warning in VS2019 by changing defining >> the MmramRangeCount variable to be UINTN and type casting prior >> to value assignment. >> >> \edk2\StandaloneMmPkg\Core\StandaloneMmCore.c(570): error C2220: >> the following warning is treated as an error >> \edk2\StandaloneMmPkg\Core\StandaloneMmCore.c(570): warning C4244: >> '=': conversion from 'UINT64' to 'UINT32', possible loss of data >> >> Cc: Ard Biesheuvel >> Cc: Sami Mujawar >> Cc: Jiewen Yao >> Cc: Supreeth Venkatesh >> Signed-off-by: Michael Kubacki >> --- >> StandaloneMmPkg/Core/StandaloneMmCore.c | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.c b/StandaloneMmPkg/Core/StandaloneMmCore.c >> index 8388ec289ca8..d254a68f2fb8 100644 >> --- a/StandaloneMmPkg/Core/StandaloneMmCore.c >> +++ b/StandaloneMmPkg/Core/StandaloneMmCore.c >> @@ -511,7 +511,7 @@ StandaloneMmMain ( >> EFI_HOB_GUID_TYPE *MmramRangesHob; >> EFI_MMRAM_HOB_DESCRIPTOR_BLOCK *MmramRangesHobData; >> EFI_MMRAM_DESCRIPTOR *MmramRanges; >> - UINT32 MmramRangeCount; >> + UINTN MmramRangeCount; >> EFI_HOB_FIRMWARE_VOLUME *BfvHob; >> >> ProcessLibraryConstructorList (HobStart, &gMmCoreMmst); >> @@ -546,7 +546,7 @@ StandaloneMmMain ( >> MmramRangesHobData = GET_GUID_HOB_DATA (MmramRangesHob); >> ASSERT (MmramRangesHobData != NULL); >> MmramRanges = MmramRangesHobData->Descriptor; >> - MmramRangeCount = MmramRangesHobData->NumberOfMmReservedRegions; >> + MmramRangeCount = (UINTN) MmramRangesHobData->NumberOfMmReservedRegions; >> ASSERT (MmramRanges); >> ASSERT (MmramRangeCount); >> >> @@ -554,7 +554,7 @@ StandaloneMmMain ( >> // Copy the MMRAM ranges into MM_CORE_PRIVATE_DATA table just in case any >> // code relies on them being present there >> // >> - gMmCorePrivate->MmramRangeCount = MmramRangeCount; >> + gMmCorePrivate->MmramRangeCount = (UINT64) MmramRangeCount; >> gMmCorePrivate->MmramRanges = >> (EFI_PHYSICAL_ADDRESS)(UINTN)AllocatePool (MmramRangeCount * sizeof (EFI_MMRAM_DESCRIPTOR)); >> ASSERT (gMmCorePrivate->MmramRanges != 0); >> @@ -567,7 +567,7 @@ StandaloneMmMain ( >> DataInHob = GET_GUID_HOB_DATA (GuidHob); >> gMmCorePrivate = (MM_CORE_PRIVATE_DATA *)(UINTN)DataInHob->Address; >> MmramRanges = (EFI_MMRAM_DESCRIPTOR *)(UINTN)gMmCorePrivate->MmramRanges; >> - MmramRangeCount = gMmCorePrivate->MmramRangeCount; >> + MmramRangeCount = (UINTN) gMmCorePrivate->MmramRangeCount; >> } >> >> // >> -- >> 2.28.0.windows.1 >> >> >> >> ------------ >> Groups.io Links: You receive all messages sent to this group. >> View/Reply Online (#71087): https://edk2.groups.io/g/devel/message/71087 >> Mute This Topic: https://groups.io/mt/80346365/5717338 >> Group Owner: devel+owner@edk2.groups.io >> Unsubscribe: https://edk2.groups.io/g/devel/unsub [ardb+tianocore@kernel.org] >> ------------ >> >> > > This patch seems to have gotten mangled, so I can't apply it. Could > you please resend it with git send-email after you fixed up the > whitespace? > > Thanks > Ard. > > > >