public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael Kubacki" <mikuback@linux.microsoft.com>
To: devel@edk2.groups.io, ardb@kernel.org
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>,
	Sami Mujawar <sami.mujawar@arm.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg/StandaloneMmCore: Fix compiler warning
Date: Wed, 10 Feb 2021 17:05:17 -0800	[thread overview]
Message-ID: <75e47645-febe-99fe-03a3-d67553f71825@linux.microsoft.com> (raw)
In-Reply-To: <CAMj1kXGiKNVPpWfvM2bF7-2sJMnuMScdJgY1OFhC21XYHX+3yw@mail.gmail.com>

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, <mikuback@linux.microsoft.com> wrote:
>>
>> From: Michael Kubacki <michael.kubacki@microsoft.com>
>>
>> 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 <ard.biesheuvel@arm.com>
>> Cc: Sami Mujawar <sami.mujawar@arm.com>
>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>> Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
>> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
>> ---
>>   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.
> 
> 
> 
> 

      reply	other threads:[~2021-02-11  1:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03  3:50 [PATCH v1 1/1] StandaloneMmPkg/StandaloneMmCore: Fix compiler warning mikuback
2021-02-09 22:07 ` Sami Mujawar
2021-02-10  2:59   ` [edk2-devel] " Michael Kubacki
2021-02-10  8:48     ` Sami Mujawar
2021-02-10 22:30 ` Ard Biesheuvel
2021-02-11  1:05   ` Michael Kubacki [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=75e47645-febe-99fe-03a3-d67553f71825@linux.microsoft.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