<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Jiewen,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Good point. Will update this in v2 patches.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,</p>
<p class="MsoNormal">Kun</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:jiewen.yao@intel.com">Yao, Jiewen</a><br>
<b>Sent: </b>Sunday, December 27, 2020 16:14<br>
<b>To: </b><a href="mailto:kun.q@outlook.com">Kun Qin</a>; <a href="mailto:devel@edk2.groups.io">
devel@edk2.groups.io</a><br>
<b>Cc: </b><a href="mailto:ard.biesheuvel@arm.com">Ard Biesheuvel</a>; <a href="mailto:sami.mujawar@arm.com">
Sami Mujawar</a>; <a href="mailto:supreeth.venkatesh@arm.com">Supreeth Venkatesh</a><br>
<b>Subject: </b>RE: [PATCH v1 03/15] StandaloneMmPkg: StandaloneMmCoreMemoryAllocationLib: Fix compiler warning</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Since below code is using (UINTN)MmramRangeCount,<br>
<br>
MmInitializeMemoryServices ((UINTN)MmramRangeCount, (VOID *)(UINTN)MmramRanges);<br>
<br>
I recommend to UINTN for MmramRangeCount, and use (UINTN) cast.<br>
<br>
> -----Original Message-----<br>
> From: Kun Qin <kun.q@outlook.com><br>
> Sent: Saturday, December 19, 2020 2:50 AM<br>
> To: devel@edk2.groups.io<br>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>; Sami Mujawar<br>
> <sami.mujawar@arm.com>; Yao, Jiewen <jiewen.yao@intel.com>; Supreeth<br>
> Venkatesh <supreeth.venkatesh@arm.com><br>
> Subject: [PATCH v1 03/15] StandaloneMmPkg:<br>
> StandaloneMmCoreMemoryAllocationLib: Fix compiler warning<br>
> <br>
> Assigning MmramRangeCount from MmCorePrivate (UINT64) to local<br>
> variable<br>
> MmramRangeCount (UINT32) will cause compilation failure due to "warning<br>
> C4244: '=': conversion from 'UINT64' to 'UINT32', possible loss of data".<br>
> This changes defines local MmramRangeCount as UINT64 type.<br>
> <br>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com><br>
> Cc: Sami Mujawar <sami.mujawar@arm.com><br>
> Cc: Jiewen Yao <jiewen.yao@intel.com><br>
> Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com><br>
> <br>
> Signed-off-by: Kun Qin <kun.q@outlook.com><br>
> ---<br>
> <br>
> StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/Stan<br>
> daloneMmCoreMemoryAllocationLib.c | 2 +-<br>
>  1 file changed, 1 insertion(+), 1 deletion(-)<br>
> <br>
> diff --git<br>
> a/StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/Sta<br>
> ndaloneMmCoreMemoryAllocationLib.c<br>
> b/StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/Sta<br>
> ndaloneMmCoreMemoryAllocationLib.c<br>
> index eb3d772e18c5..798d546a2037 100644<br>
> ---<br>
> a/StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/Sta<br>
> ndaloneMmCoreMemoryAllocationLib.c<br>
> +++<br>
> b/StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/Sta<br>
> ndaloneMmCoreMemoryAllocationLib.c<br>
> @@ -841,7 +841,7 @@ MemoryAllocationLibConstructor (<br>
>    VOID                            *HobStart;<br>
>    EFI_MMRAM_HOB_DESCRIPTOR_BLOCK  *MmramRangesHobData;<br>
>    EFI_MMRAM_DESCRIPTOR            *MmramRanges;<br>
> -  UINT32                           MmramRangeCount;<br>
> +  UINT64                           MmramRangeCount;<br>
>    EFI_HOB_GUID_TYPE               *MmramRangesHob;<br>
> <br>
>    HobStart = GetHobList ();<br>
> --<br>
> 2.28.0.windows.1<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr> Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/69472">View/Reply Online (#69472)</a> |    |  <a target="_blank" href="https://groups.io/mt/79068286/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>