From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web09.441.1612996215382813075 for ; Wed, 10 Feb 2021 14:30:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E/xH8hci; spf=pass (domain: kernel.org, ip: 198.145.29.99, mailfrom: ardb@kernel.org) Received: by mail.kernel.org (Postfix) with ESMTPSA id 91BD560C41 for ; Wed, 10 Feb 2021 22:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612996214; bh=dy431UVFr5ggZ8t31KwGYoc8GPirVDdY8ITSeD4hj5g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=E/xH8hciQtuPw/ILLPmtbx9fte1T5PM9evL5i243WUjwcCsBvG+jnWgcuBOw/cCh9 O2EVdd1v6bvpCV2skpCDyZ6hvp5Ga0Pd9Re0rE19FiWI33EgtBGQ1GF+8ipkKsSMJ5 pAzruGAxBIzu+BobLUvtzc8oLb/43+tQQx9oz/zi8fVKOa8S1QcPQymGBWWcpHn4Fg rhYGCodhmJfPK28/8Q/UgOq5CRfBK3RncByRDEEi9VURSCrOGiRS6idUhrMUpt8qLs RkVNRCLy0WMsWqHYJrGgYkUsW/yDfCrN4hzVe7oeNoff7pMeTEcwty7UM6FNZGn6YB 2PWoGM6Snf+qw== Received: by mail-oi1-f171.google.com with SMTP id k204so3950207oih.3 for ; Wed, 10 Feb 2021 14:30:14 -0800 (PST) X-Gm-Message-State: AOAM533s0Cs0Gmzh79EvFllEox9tr5lNqjZIWmz4lHdqEUrr9XHK+18a syMtOxzYOGJnYi2uk4Q1PhGp3R9RIDarULbbzKk= X-Google-Smtp-Source: ABdhPJwX3KGUjdVfywszXFixicKjE2Cp/uiB/k5JCCCEMSn4d14FACfcC2ZM3lS7tcmIOjtTrjWh/INxK9J9DpveHbY= X-Received: by 2002:aca:4bd1:: with SMTP id y200mr865082oia.33.1612996213966; Wed, 10 Feb 2021 14:30:13 -0800 (PST) MIME-Version: 1.0 References: <20210203035052.402-1-mikuback@linux.microsoft.com> In-Reply-To: <20210203035052.402-1-mikuback@linux.microsoft.com> From: "Ard Biesheuvel" Date: Wed, 10 Feb 2021 23:30:03 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg/StandaloneMmCore: Fix compiler warning To: devel@edk2.groups.io, Michael Kubacki Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Supreeth Venkatesh Content-Type: text/plain; charset="UTF-8" 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.