From: "Ni, Ray" <ray.ni@intel.com>
To: "mikuback@linux.microsoft.com" <mikuback@linux.microsoft.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Chaganty, Rangasai V" <rangasai.v.chaganty@intel.com>,
"Chuang, SofiaX" <sofiax.chuang@intel.com>
Subject: Re: [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg: Cast UINT32 to UINT8 conversion in ReportCpuHobLib
Date: Thu, 20 May 2021 04:24:30 +0000 [thread overview]
Message-ID: <CO1PR11MB49301FA7A47686EE386E4D008C2A9@CO1PR11MB4930.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210519041530.1368-1-mikuback@linux.microsoft.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Since it's a pure a build failure fix, I will merge it now.
> -----Original Message-----
> From: mikuback@linux.microsoft.com <mikuback@linux.microsoft.com>
> Sent: Wednesday, May 19, 2021 12:16 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>; Chuang, SofiaX <sofiax.chuang@intel.com>
> Subject: [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg: Cast UINT32 to
> UINT8 conversion in ReportCpuHobLib
>
> From: Michael Kubacki <michael.kubacki@microsoft.com>
>
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3404
>
> Commit d3c10d3 introduced a build error in ReportCpuHobLib.c:
>
> IntelSiliconPkg\Library\ReportCpuHobLib\ReportCpuHobLib.c(30):
> error C2220: warning treated as error - no 'object' file generated
> IntelSiliconPkg\Library\ReportCpuHobLib\ReportCpuHobLib.c(30):
> warning C4244: '=': conversion from 'UINT32' to 'UINT8',
> possible loss of data
>
> This commit explicitly cast the assignment to fix the build error.
>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
> Cc: SofiaX Chuang <sofiax.chuang@intel.com>
> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
> ---
> Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c |
> 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
> a/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c
> b/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c
> index 3f67b477d25a..56d63a35edcb 100644
> ---
> a/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c
> +++
> b/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c
> @@ -27,7 +27,7 @@ ReportCpuHob (
> AsmCpuid (CPUID_VIR_PHY_ADDRESS_SIZE, &AddressSizeEax.Uint32,
> NULL, NULL, NULL);
> if (AddressSizeEax.Uint32 >= CPUID_VIR_PHY_ADDRESS_SIZE) {
> AsmCpuid (CPUID_VIR_PHY_ADDRESS_SIZE, &AddressSizeEax.Uint32,
> NULL, NULL, NULL);
> - PhysicalAddressBits = AddressSizeEax.Bits.PhysicalAddressBits;
> + PhysicalAddressBits = (UINT8)AddressSizeEax.Bits.PhysicalAddressBits;
> } else {
> PhysicalAddressBits = 36;
> }
> --
> 2.28.0.windows.1
prev parent reply other threads:[~2021-05-20 4:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 4:15 [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg: Cast UINT32 to UINT8 conversion in ReportCpuHobLib Michael Kubacki
2021-05-20 4:24 ` Ni, Ray [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=CO1PR11MB49301FA7A47686EE386E4D008C2A9@CO1PR11MB4930.namprd11.prod.outlook.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