[edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning

Michael D Kinney michael.d.kinney at intel.com
Tue Dec 14 06:37:20 UTC 2021


The log with the information on the issue is here:

https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=35602&view=logs&j=780eaa17-fc2d-5131-b9d2-21b19bc9bec5&t=0a858618-38b5-5fca-13af-b958e180d2a0&l=36

It lists the filename that did not match the expected uncrustify result.

PROGRESS - --Running OvmfPkg: Uncrustify Coding Standard Test NO-TARGET --
WARNING - A file header template is not specified in the config file.
WARNING - A function header template is not specified in the config file.
ERROR - D:\a\1\s\OvmfPkg\Library\VmgExitLib\VmgExitVcHandler.c
ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET returned 1

I may be possible to provide more details on which lines had the differences, but the idea
was that the filename is enough because that is the input to the uncrustify tool.

Please make sure you are using the version of uncrustify installed by the stuart* tools
and the configuration file provided with the UncruustifyCheck pytool plugin.

Thanks,

Mike


From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Brijesh Singh via groups.io
Sent: Monday, December 13, 2021 7:27 PM
To: devel at edk2.groups.io; Yao, Jiewen <jiewen.yao at intel.com>; rebecca at nuviainc.com
Cc: James Bottomley <jejb at linux.ibm.com>; Xu, Min M <min.m.xu at intel.com>; Lendacky, Thomas <Thomas.Lendacky at amd.com>; Justen, Jordan L <jordan.l.justen at intel.com>; Ard Biesheuvel <ardb+tianocore at kernel.org>; Aktas, Erdem <erdemaktas at google.com>; Roth, Michael <Michael.Roth at amd.com>; Gerd Hoffmann <kraxel at redhat.com>; Rebecca Cran <rebecca at bsdio.com>
Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning


[AMD Official Use Only]

I did ran uncrustify before submitting the patch. I am wondering if CI is reporting for some other issue in that file. I will look at it tomorrow.

-Brijesh

________________________________
From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> on behalf of Rebecca Cran via groups.io <rebecca=nuviainc.com at groups.io<mailto:rebecca=nuviainc.com at groups.io>>
Sent: Monday, December 13, 2021 8:41 PM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>>; jiewen.yao at intel.com<mailto:jiewen.yao at intel.com> <jiewen.yao at intel.com<mailto:jiewen.yao at intel.com>>; Singh, Brijesh <brijesh.singh at amd.com<mailto:brijesh.singh at amd.com>>
Cc: James Bottomley <jejb at linux.ibm.com<mailto:jejb at linux.ibm.com>>; Xu, Min M <min.m.xu at intel.com<mailto:min.m.xu at intel.com>>; Lendacky, Thomas <Thomas.Lendacky at amd.com<mailto:Thomas.Lendacky at amd.com>>; Justen, Jordan L <jordan.l.justen at intel.com<mailto:jordan.l.justen at intel.com>>; Ard Biesheuvel <ardb+tianocore at kernel.org<mailto:ardb+tianocore at kernel.org>>; Aktas, Erdem <erdemaktas at google.com<mailto:erdemaktas at google.com>>; Roth, Michael <Michael.Roth at amd.com<mailto:Michael.Roth at amd.com>>; Gerd Hoffmann <kraxel at redhat.com<mailto:kraxel at redhat.com>>; Rebecca Cran <rebecca at bsdio.com<mailto:rebecca at bsdio.com>>
Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning


The error is:

ERROR - /home/vsts/work/1/s/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET returned 1



From what I can see, there's no report of the actual error here, so you have to setup Uncrustify locally to see what changes it wants to make.

For instructions on setting up Uncrustify, see https://github.com/makubacki/tianocore.github.io/blob/add_uncrustify_instructions/EDK-II-Code-Formatting.md<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmakubacki%2Ftianocore.github.io%2Fblob%2Fadd_uncrustify_instructions%2FEDK-II-Code-Formatting.md&data=04%7C01%7Cbrijesh.singh%40amd.com%7C7ecf1a179d074ef3f37508d9beab5348%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637750465337231937%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Sl05dDDFzzZvpvzJp%2Bw5DWE81ocuy%2BYC4VfNxffyq5c%3D&reserved=0> .



Given the change, I expect the indentation of the equals sign is wrong.



--
Rebecca Cran

On 12/13/21 7:34 PM, Yao, Jiewen wrote:

Hey Brijesh



CI fails - https://github.com/tianocore/edk2/pull/2301<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fpull%2F2301&data=04%7C01%7Cbrijesh.singh%40amd.com%7C7ecf1a179d074ef3f37508d9beab5348%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637750465337241935%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=914Gty%2BcMcmasiuDAUXdQr78gmU71%2FqL5mVcsbfrrSQ%3D&reserved=0>

Would you please take a look?



Please remember to submit patch after you run CI next time.



-----Original Message-----

From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io><mailto:devel at edk2.groups.io> On Behalf Of Yao, Jiewen

Sent: Tuesday, December 14, 2021 10:11 AM

To: Brijesh Singh <brijesh.singh at amd.com><mailto:brijesh.singh at amd.com>; devel at edk2.groups.io<mailto:devel at edk2.groups.io>

Cc: James Bottomley <jejb at linux.ibm.com><mailto:jejb at linux.ibm.com>; Xu, Min M <min.m.xu at intel.com><mailto:min.m.xu at intel.com>;

Tom Lendacky <thomas.lendacky at amd.com><mailto:thomas.lendacky at amd.com>; Justen, Jordan L

<jordan.l.justen at intel.com><mailto:jordan.l.justen at intel.com>; Ard Biesheuvel <ardb+tianocore at kernel.org><mailto:ardb+tianocore at kernel.org>;

Aktas, Erdem <erdemaktas at google.com><mailto:erdemaktas at google.com>; Michael Roth

<Michael.Roth at amd.com><mailto:Michael.Roth at amd.com>; Gerd Hoffmann <kraxel at redhat.com><mailto:kraxel at redhat.com>; Rebecca

Cran <rebecca at bsdio.com><mailto:rebecca at bsdio.com>

Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized

variable warning



Reviewed-by: Jiewen Yao <Jiewen.yao at intel.com><mailto:Jiewen.yao at intel.com>



-----Original Message-----

From: Brijesh Singh <brijesh.singh at amd.com><mailto:brijesh.singh at amd.com>

Sent: Tuesday, December 14, 2021 3:39 AM

To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>

Cc: James Bottomley <jejb at linux.ibm.com><mailto:jejb at linux.ibm.com>; Xu, Min M

<min.m.xu at intel.com><mailto:min.m.xu at intel.com>;

Yao, Jiewen <jiewen.yao at intel.com><mailto:jiewen.yao at intel.com>; Tom Lendacky

<thomas.lendacky at amd.com><mailto:thomas.lendacky at amd.com>; Justen, Jordan L <jordan.l.justen at intel.com><mailto:jordan.l.justen at intel.com>;

Ard Biesheuvel <ardb+tianocore at kernel.org><mailto:ardb+tianocore at kernel.org>; Aktas, Erdem

<erdemaktas at google.com><mailto:erdemaktas at google.com>; Michael Roth <Michael.Roth at amd.com><mailto:Michael.Roth at amd.com>; Gerd

Hoffmann <kraxel at redhat.com><mailto:kraxel at redhat.com>; Brijesh Singh <brijesh.singh at amd.com><mailto:brijesh.singh at amd.com>;

Rebecca Cran <rebecca at bsdio.com><mailto:rebecca at bsdio.com>

Subject: [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning



The XCODE5 reported the below warning



OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized

use occurs here

           Compacted

           ^^^^^^^^^



Initialize the 'Compacted' variable to fix the warning.



Fixes: d2b998fbdca4 (OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID

values)

Cc: James Bottomley <jejb at linux.ibm.com><mailto:jejb at linux.ibm.com>

Cc: Min Xu <min.m.xu at intel.com><mailto:min.m.xu at intel.com>

Cc: Jiewen Yao <jiewen.yao at intel.com><mailto:jiewen.yao at intel.com>

Cc: Tom Lendacky <thomas.lendacky at amd.com><mailto:thomas.lendacky at amd.com>

Cc: Jordan Justen <jordan.l.justen at intel.com><mailto:jordan.l.justen at intel.com>

Cc: Ard Biesheuvel <ardb+tianocore at kernel.org><mailto:ardb+tianocore at kernel.org>

Cc: Erdem Aktas <erdemaktas at google.com><mailto:erdemaktas at google.com>

Cc: Gerd Hoffmann <kraxel at redhat.com><mailto:kraxel at redhat.com>

Cc: Rebecca Cran <rebecca at bsdio.com><mailto:rebecca at bsdio.com>

Cc: Michael Roth <Michael.Roth at amd.com><mailto:Michael.Roth at amd.com>

Signed-off-by: Brijesh Singh <brijesh.singh at amd.com><mailto:brijesh.singh at amd.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..ff367411cc59 100644

--- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c

+++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c

@@ -1872,6 +1872,7 @@ GetCpuidFw (

     UINT32                 XSaveSize;



     XssMsr.Uint64 = 0;

+    Compacted = FALSE;

     if (EcxIn == 1) {

       /*

        * The PPR and APM aren't clear on what size should be encoded in

--

2.25.1













-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#84792): https://edk2.groups.io/g/devel/message/84792
Mute This Topic: https://groups.io/mt/87705849/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20211214/437f0ea0/attachment.htm>


More information about the edk2-devel-archive mailing list