public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning with XCODE5
@ 2022-02-04 20:13 Rebecca Cran
  2022-02-10  9:17 ` [edk2-devel] " Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Rebecca Cran @ 2022-02-04 20:13 UTC (permalink / raw)
  To: devel, James Bottomley, Min Xu, Jiewen Yao, Tom Lendacky,
	Jordan Justen, Ard Biesheuvel, Erdem Aktas, Michael Roth,
	Gerd Hoffmann, Brijesh Singh
  Cc: Rebecca Cran

XCODE5 reported the following warning:

OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note:
uninitialized use occurs here
           Compacted
           ^^^^^^^^^

Initialize the 'Compacted' variable to fix the warning.

Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com>
---
 OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
index a40a31f7c275..ccb1300690fa 100644
--- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
+++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
@@ -1872,6 +1872,7 @@ GetCpuidFw (
     UINT32                 XSaveSize;
 
     XssMsr.Uint64 = 0;
+    Compacted     = 0;
     if (EcxIn == 1) {
       /*
        * The PPR and APM aren't clear on what size should be encoded in
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning with XCODE5
  2022-02-04 20:13 [PATCH v2 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning with XCODE5 Rebecca Cran
@ 2022-02-10  9:17 ` Ard Biesheuvel
  2022-02-10  9:17   ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2022-02-10  9:17 UTC (permalink / raw)
  To: edk2-devel-groups-io, Rebecca Cran
  Cc: James Bottomley, Min Xu, Jiewen Yao, Tom Lendacky, Jordan Justen,
	Ard Biesheuvel, Erdem Aktas, Michael Roth, Gerd Hoffmann,
	Brijesh Singh

(+ Liming)

On Fri, 4 Feb 2022 at 21:28, Rebecca Cran <quic_rcran@quicinc.com> wrote:
>
> XCODE5 reported the following warning:
>
> OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note:
> uninitialized use occurs here
>            Compacted
>            ^^^^^^^^^
>
> Initialize the 'Compacted' variable to fix the warning.
>
> Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com>
> ---
>  OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> index a40a31f7c275..ccb1300690fa 100644
> --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> @@ -1872,6 +1872,7 @@ GetCpuidFw (
>      UINT32                 XSaveSize;
>
>      XssMsr.Uint64 = 0;
> +    Compacted     = 0;

This should be FALSE not 0. I will fix this up before merging.

Liming: is it ok if I merge this today?


>      if (EcxIn == 1) {
>        /*
>         * The PPR and APM aren't clear on what size should be encoded in
> --
> 2.34.1
>
>
>
> 
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning with XCODE5
  2022-02-10  9:17 ` [edk2-devel] " Ard Biesheuvel
@ 2022-02-10  9:17   ` Ard Biesheuvel
  2022-02-11  1:13     ` 回复: " gaoliming
  0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2022-02-10  9:17 UTC (permalink / raw)
  To: edk2-devel-groups-io, Rebecca Cran, Liming Gao (Byosoft address)
  Cc: James Bottomley, Min Xu, Jiewen Yao, Tom Lendacky, Jordan Justen,
	Ard Biesheuvel, Erdem Aktas, Michael Roth, Gerd Hoffmann,
	Brijesh Singh

On Thu, 10 Feb 2022 at 10:17, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> (+ Liming)
>

... for real this time.

> On Fri, 4 Feb 2022 at 21:28, Rebecca Cran <quic_rcran@quicinc.com> wrote:
> >
> > XCODE5 reported the following warning:
> >
> > OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note:
> > uninitialized use occurs here
> >            Compacted
> >            ^^^^^^^^^
> >
> > Initialize the 'Compacted' variable to fix the warning.
> >
> > Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com>
> > ---
> >  OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > index a40a31f7c275..ccb1300690fa 100644
> > --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > @@ -1872,6 +1872,7 @@ GetCpuidFw (
> >      UINT32                 XSaveSize;
> >
> >      XssMsr.Uint64 = 0;
> > +    Compacted     = 0;
>
> This should be FALSE not 0. I will fix this up before merging.
>
> Liming: is it ok if I merge this today?
>
>
> >      if (EcxIn == 1) {
> >        /*
> >         * The PPR and APM aren't clear on what size should be encoded in
> > --
> > 2.34.1
> >
> >
> >
> > 
> >
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

* 回复: [edk2-devel] [PATCH v2 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning with XCODE5
  2022-02-10  9:17   ` Ard Biesheuvel
@ 2022-02-11  1:13     ` gaoliming
  2022-02-15 10:20       ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: gaoliming @ 2022-02-11  1:13 UTC (permalink / raw)
  To: 'Ard Biesheuvel', 'edk2-devel-groups-io',
	'Rebecca Cran'
  Cc: 'James Bottomley', 'Min Xu', 'Jiewen Yao',
	'Tom Lendacky', 'Jordan Justen',
	'Ard Biesheuvel', 'Erdem Aktas',
	'Michael Roth', 'Gerd Hoffmann',
	'Brijesh Singh'

Ard:
 I am OK to merge this issue for this stable tag. It is a clear bug fix. 

Thanks
Liming
> -----邮件原件-----
> 发件人: Ard Biesheuvel <ardb@kernel.org>
> 发送时间: 2022年2月10日 17:18
> 收件人: edk2-devel-groups-io <devel@edk2.groups.io>; Rebecca Cran
> <quic_rcran@quicinc.com>; Liming Gao (Byosoft address)
> <gaoliming@byosoft.com.cn>
> 抄送: James Bottomley <jejb@linux.ibm.com>; Min Xu
> <min.m.xu@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Tom Lendacky
> <thomas.lendacky@amd.com>; Jordan Justen <jordan.l.justen@intel.com>;
> Ard Biesheuvel <ardb+tianocore@kernel.org>; Erdem Aktas
> <erdemaktas@google.com>; Michael Roth <Michael.Roth@amd.com>; Gerd
> Hoffmann <kraxel@redhat.com>; Brijesh Singh <brijesh.singh@amd.com>
> 主题: Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/VmgExitLib: Fix uninitialized
> variable warning with XCODE5
> 
> On Thu, 10 Feb 2022 at 10:17, Ard Biesheuvel <ardb@kernel.org> wrote:
> >
> > (+ Liming)
> >
> 
> ... for real this time.
> 
> > On Fri, 4 Feb 2022 at 21:28, Rebecca Cran <quic_rcran@quicinc.com>
> wrote:
> > >
> > > XCODE5 reported the following warning:
> > >
> > > OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note:
> > > uninitialized use occurs here
> > >            Compacted
> > >            ^^^^^^^^^
> > >
> > > Initialize the 'Compacted' variable to fix the warning.
> > >
> > > Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com>
> > > ---
> > >  OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > > index a40a31f7c275..ccb1300690fa 100644
> > > --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > > +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > > @@ -1872,6 +1872,7 @@ GetCpuidFw (
> > >      UINT32                 XSaveSize;
> > >
> > >      XssMsr.Uint64 = 0;
> > > +    Compacted     = 0;
> >
> > This should be FALSE not 0. I will fix this up before merging.
> >
> > Liming: is it ok if I merge this today?
> >
> >
> > >      if (EcxIn == 1) {
> > >        /*
> > >         * The PPR and APM aren't clear on what size should be
> encoded in
> > > --
> > > 2.34.1
> > >
> > >
> > >
> > > 
> > >
> > >



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning with XCODE5
  2022-02-11  1:13     ` 回复: " gaoliming
@ 2022-02-15 10:20       ` Ard Biesheuvel
  0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2022-02-15 10:20 UTC (permalink / raw)
  To: edk2-devel-groups-io, Liming Gao (Byosoft address)
  Cc: Rebecca Cran, James Bottomley, Min Xu, Jiewen Yao, Tom Lendacky,
	Jordan Justen, Ard Biesheuvel, Erdem Aktas, Michael Roth,
	Gerd Hoffmann, Brijesh Singh

On Fri, 11 Feb 2022 at 02:14, gaoliming <gaoliming@byosoft.com.cn> wrote:
>
> Ard:
>  I am OK to merge this issue for this stable tag. It is a clear bug fix.
>

Merged as #2523

Thanks all,


> > -----邮件原件-----
> > 发件人: Ard Biesheuvel <ardb@kernel.org>
> > 发送时间: 2022年2月10日 17:18
> > 收件人: edk2-devel-groups-io <devel@edk2.groups.io>; Rebecca Cran
> > <quic_rcran@quicinc.com>; Liming Gao (Byosoft address)
> > <gaoliming@byosoft.com.cn>
> > 抄送: James Bottomley <jejb@linux.ibm.com>; Min Xu
> > <min.m.xu@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Tom Lendacky
> > <thomas.lendacky@amd.com>; Jordan Justen <jordan.l.justen@intel.com>;
> > Ard Biesheuvel <ardb+tianocore@kernel.org>; Erdem Aktas
> > <erdemaktas@google.com>; Michael Roth <Michael.Roth@amd.com>; Gerd
> > Hoffmann <kraxel@redhat.com>; Brijesh Singh <brijesh.singh@amd.com>
> > 主题: Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/VmgExitLib: Fix uninitialized
> > variable warning with XCODE5
> >
> > On Thu, 10 Feb 2022 at 10:17, Ard Biesheuvel <ardb@kernel.org> wrote:
> > >
> > > (+ Liming)
> > >
> >
> > ... for real this time.
> >
> > > On Fri, 4 Feb 2022 at 21:28, Rebecca Cran <quic_rcran@quicinc.com>
> > wrote:
> > > >
> > > > XCODE5 reported the following warning:
> > > >
> > > > OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note:
> > > > uninitialized use occurs here
> > > >            Compacted
> > > >            ^^^^^^^^^
> > > >
> > > > Initialize the 'Compacted' variable to fix the warning.
> > > >
> > > > Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com>
> > > > ---
> > > >  OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > > > index a40a31f7c275..ccb1300690fa 100644
> > > > --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > > > +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > > > @@ -1872,6 +1872,7 @@ GetCpuidFw (
> > > >      UINT32                 XSaveSize;
> > > >
> > > >      XssMsr.Uint64 = 0;
> > > > +    Compacted     = 0;
> > >
> > > This should be FALSE not 0. I will fix this up before merging.
> > >
> > > Liming: is it ok if I merge this today?
> > >
> > >
> > > >      if (EcxIn == 1) {
> > > >        /*
> > > >         * The PPR and APM aren't clear on what size should be
> > encoded in
> > > > --
> > > > 2.34.1
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
>
>
>
>
> 
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-15 10:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-04 20:13 [PATCH v2 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning with XCODE5 Rebecca Cran
2022-02-10  9:17 ` [edk2-devel] " Ard Biesheuvel
2022-02-10  9:17   ` Ard Biesheuvel
2022-02-11  1:13     ` 回复: " gaoliming
2022-02-15 10:20       ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox