From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id D2983AC0A8B for ; Tue, 2 Apr 2024 06:57:41 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=nahqfFZgVIq3qODSMiyA9R8cW9D4CKXd1ATSJ392xm0=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1712041060; v=1; b=T466CJzZdMvfbXPGNxtz+cPoHVlr9gZk9GkVgQ0uZ5McqWDx2msPbliXCXwsrmz7yOXQbqZR wtqLkGQZd4IvS/r8wsvzP+aD+oqYcCjkEutiIIH+s+A+5mYMTLd8O/puIMg9oW26L58T7hH0/Qv m2qfEAx27OJSWiEnHzvtAR5r0SUxSLXdfVCoS8Zw+1TJmVfgNpMvIn4sRdM15zF4seUVwnEliyr w8/rNGT2bJmHdAxAE/G6neI8ZY5iOvmW3DhfB7Em0Y5AdOD2QkykYXkoJU/z7L9vNdsKJy2MNop 85PgZ7Iq8s/NW83HDOkccrhWpzZWyH9tGufpzRYXTJCgA== X-Received: by 127.0.0.2 with SMTP id 33AfYY7687511xUBSFPwt60a; Mon, 01 Apr 2024 23:57:40 -0700 X-Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.92]) by mx.groups.io with SMTP id smtpd.web11.6625.1712041059874477570 for ; Mon, 01 Apr 2024 23:57:40 -0700 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by DS0PR12MB7826.namprd12.prod.outlook.com (2603:10b6:8:148::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Tue, 2 Apr 2024 06:57:34 +0000 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::fef9:2c9c:21b5:6f50]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::fef9:2c9c:21b5:6f50%2]) with mapi id 15.20.7409.042; Tue, 2 Apr 2024 06:57:34 +0000 From: "Nickle Wang via groups.io" To: "devel@edk2.groups.io" , "abner.chang@amd.com" CC: Igor Kulchytskyy Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg/Features: Variable used before being initialized Thread-Topic: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg/Features: Variable used before being initialized Thread-Index: AQHahEI2MNiZvyyj9UisnxKgo55VmrFUbThQgAAgMOA= Date: Tue, 2 Apr 2024 06:57:34 +0000 Message-ID: References: <20240401143741.51236-1-nicklew@nvidia.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=544aa46d-838d-40b2-82e0-be56fbf421ca;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2024-04-02T05:01:49Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|DS0PR12MB7826:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: WzqkrVKVEL1gOmmbNLFBU0LiIWeonwDilgqmWnFK0cVJWw/D95fdMg0K/8xBtCnDWg94eXlriaLBoJNINPWAYlkjvtGisw0rSoyjpS/hjdjcKgmjq2fe3pI93ZGARChvr1i+P32qSK3NxVdWdDZ+xzbtlrr7hmtyUKLTG0dVseAbsxKq3idx+GIy2OYouwpSi20WMffC8mrXufGhpQ1VA2jNDKh0KTcItDjv35dG4z8BYOCzchftFjUW9Xu509Es8qo4vJMjwvBoqqQVILDb9itJRN1lTbgrdaz5Aw4W3w4pSIxsmzFJSjVlcGQ3hk9bG2NGqbPymU5FmDg33CVf9bQL3Mmn56tu1qA+XfQ4e/2G47NUAptEYm/ADyUjwM63iBK9P5AsL3SkWtOpO2dEF+sVuD+fYrLUBRw9kLEmH8jV2XF8546tROTvaWJliestODc33WBtyEiMUVx+4sFANpbwOQ3loE7u4I0IeOfusI4sAKrU6qgMQZgc3IjsrBT7OBh1PCbZZAJ7XfaX6Loj2W2ZlGOwM7oEWO0mGw5Qjg5d6hpaX1p5g8/8VaQXhXaEEpQG81wfOglqMIvOFHH7GR0QJxBRIlmhex69LnJ05CQ= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?iNOQznJlG1BrVCMW58bNY5oLX35hT50JxzAQVpeE8vwLvV91618RJrhxXccO?= =?us-ascii?Q?gH9U3JWWT9qyh5Azc0gMO7CMTuhOczm40o2ket1X1e6mUSi2cxApxPyTCtCe?= =?us-ascii?Q?EupyMbqFm/rHBhh8uQuwz2hIajFO7994fKnHEv7xD6HHLR4vl6viyg6sLuhS?= =?us-ascii?Q?y9JsDHdxezPlvUlHE3euSDxxrVpuuJBsrSGj0d1RwCGRufbvn/DaPomKUbyT?= =?us-ascii?Q?Husfm0lgAEkey/eRLcIsBjI7biILrz7Ect2dNe70gVYPBbtBceyd82FvSUXs?= =?us-ascii?Q?MPGd3Kt7JOnRyhq0QCAVHVflzfRYabBE4SP90jlT6MLus2BSs7cvW5DajcRK?= =?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CDyvlPRe+TSNniERtdQcSukPbJ0?= =?us-ascii?Q?7P9prY/qAGAGtxT0FeYa8wIYGbMvSF8CsYx8yJM6eT0ZeXZeBy1JvgXdzwse?= =?us-ascii?Q?wbDFde6QefesCRJJmDnOD5UT9UlERQtDkEn9/j95JwOAhPX86+TrQAr6HlDP?= =?us-ascii?Q?wz3ZqGuTwNdlawCyA+O3xWU+sjMaIZsR8QR3bHyrOWJctk3ZDensReV5lLJY?= =?us-ascii?Q?AXi7ctWKd833aJpG1R+R2EWRQObxmpfMvASBqX84kIxASBwqJewLbemhD/48?= =?us-ascii?Q?ZWYneDZI/B7PwqdRGQDGVIoRlMtI90xawyaJ5Yb9LSMSrqvd0nGQwd/zSRGr?= =?us-ascii?Q?37W1t9JDshDehp4/6zo=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77505e9a-b46d-4df2-7203-08dc52e22cab X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2024 06:57:34.4932 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XYY8qewKXsBEJbqbbZivIcn1oQnhTBVyrwSs5NjJWwGP/9D9oLocuAiWaZidvB0zm+UEoe+cVuMrYaFKFuWKWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7826 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 01 Apr 2024 23:57:40 -0700 Resent-From: nicklew@nvidia.com Reply-To: devel@edk2.groups.io,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: W4wscs3dTamD6frJJtf0oPKdx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=T466CJzZ; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Thanks for your review, Abner! I merged this change. Regards, Nickle > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Chang, Abn= er > via groups.io > Sent: Tuesday, April 2, 2024 1:04 PM > To: Nickle Wang ; devel@edk2.groups.io > Cc: Igor Kulchytskyy > Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH] > RedfishClientPkg/Features: Variable used before being initialized >=20 > External email: Use caution opening links or attachments >=20 >=20 > [AMD Official Use Only - General] >=20 > Hi Nickle, > Use Uri makes sense to me. Thanks! Please go ahead to merge it. > Reviewed-by: Abner Chang . >=20 > > -----Original Message----- > > From: Nickle Wang > > Sent: Monday, April 1, 2024 10:38 PM > > To: devel@edk2.groups.io > > Cc: Chang, Abner ; Igor Kulchytskyy > > > > Subject: [edk2-redfish-client][PATCH] RedfishClientPkg/Features: > > Variable used before being initialized > > > > Caution: This message originated from an External Source. Use proper > > caution when opening attachments, clicking links, or responding. > > > > > > Private->Uri is initialized after calling > > Private->SetRedfishSettingsObjectsUri() > > but it is used in SetRedfishSettingsObjectsUri function. Use input > > parameter "Uri" instead. > > > > Signed-off-by: Nickle Wang > > Cc: Abner Chang > > Cc: Igor Kulchytskyy > > --- > > RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c | 2 +- > > RedfishClientPkg/Features/BootOption/v1_0_4/Dxe/BootOptionDxe.c | 2 +- > > .../Features/ComputerSystem/v1_13_0/Dxe/ComputerSystemDxe.c | 2 +- > > .../Features/ComputerSystem/v1_5_0/Dxe/ComputerSystemDxe.c | 2 +- > > RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c | 2 +- > > 5 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > > b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > > index bb64ef862..ed7823a59 100644 > > --- a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > > +++ b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > > @@ -141,7 +141,7 @@ RedfishResourceConsumeResource ( > > ); > > if (!EFI_ERROR (Status)) { > > DEBUG ((REDFISH_DEBUG_TRACE, "%a: @Redfish.Settings found: %s\n", > > __func__, PendingSettingUri)); > > - SetRedfishSettingsObjectsUri (Private->Uri, PendingSettingUri); > > + SetRedfishSettingsObjectsUri (Uri, PendingSettingUri); > > Private->Uri =3D PendingSettingUri; > > ExpectedResponse =3D &PendingSettingResponse; > > } else { > > diff --git > > a/RedfishClientPkg/Features/BootOption/v1_0_4/Dxe/BootOptionDxe.c > > b/RedfishClientPkg/Features/BootOption/v1_0_4/Dxe/BootOptionDxe.c > > index 5a66fe59e..fec3a0090 100644 > > --- a/RedfishClientPkg/Features/BootOption/v1_0_4/Dxe/BootOptionDxe.c > > +++ b/RedfishClientPkg/Features/BootOption/v1_0_4/Dxe/BootOptionDxe.c > > @@ -130,7 +130,7 @@ RedfishResourceConsumeResource ( > > ); > > if (!EFI_ERROR (Status)) { > > DEBUG ((REDFISH_BOOT_OPTION_DEBUG_TRACE, "%a: @Redfish.Settings > > found: %s\n", __func__, PendingSettingUri)); > > - SetRedfishSettingsObjectsUri (Private->Uri, PendingSettingUri); > > + SetRedfishSettingsObjectsUri (Uri, PendingSettingUri); > > Private->Uri =3D PendingSettingUri; > > ExpectedResponse =3D &PendingSettingResponse; > > } else { > > diff --git > > a/RedfishClientPkg/Features/ComputerSystem/v1_13_0/Dxe/ComputerSyste > > mDxe.c > > b/RedfishClientPkg/Features/ComputerSystem/v1_13_0/Dxe/ComputerSyst > > emDxe.c > > index a0c71212b..d829a22d2 100644 > > --- > > a/RedfishClientPkg/Features/ComputerSystem/v1_13_0/Dxe/ComputerSyste > > mDxe.c > > +++ > > b/RedfishClientPkg/Features/ComputerSystem/v1_13_0/Dxe/ComputerSyst > > emDxe.c > > @@ -133,7 +133,7 @@ RedfishResourceConsumeResource ( > > ); > > if (!EFI_ERROR (Status)) { > > DEBUG ((REDFISH_DEBUG_TRACE, "%a: @Redfish.Settings found: %s\n", > > __func__, PendingSettingUri)); > > - SetRedfishSettingsObjectsUri (Private->Uri, PendingSettingUri); > > + SetRedfishSettingsObjectsUri (Uri, PendingSettingUri); > > Private->Uri =3D PendingSettingUri; > > ExpectedResponse =3D &PendingSettingResponse; > > } else { > > diff --git > > a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSyste > > mDxe.c > > b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSyste > > mDxe.c > > index 494bf59df..de1691534 100644 > > --- > > a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSyste > > mDxe.c > > +++ > > b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSyste > > mDxe.c > > @@ -134,7 +134,7 @@ RedfishResourceConsumeResource ( > > ); > > if (!EFI_ERROR (Status)) { > > DEBUG ((REDFISH_DEBUG_TRACE, "%a: @Redfish.Settings found: %s\n", > > __func__, PendingSettingUri)); > > - SetRedfishSettingsObjectsUri (Private->Uri, PendingSettingUri); > > + SetRedfishSettingsObjectsUri (Uri, PendingSettingUri); > > Private->Uri =3D PendingSettingUri; > > ExpectedResponse =3D &PendingSettingResponse; > > } else { > > diff --git a/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c > > b/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c > > index f2c0a7735..413b90c97 100644 > > --- a/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c > > +++ b/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c > > @@ -134,7 +134,7 @@ RedfishResourceConsumeResource ( > > ); > > if (!EFI_ERROR (Status)) { > > DEBUG ((REDFISH_DEBUG_TRACE, "%a: @Redfish.Settings found: %s\n", > > __func__, PendingSettingUri)); > > - SetRedfishSettingsObjectsUri (Private->Uri, PendingSettingUri); > > + SetRedfishSettingsObjectsUri (Uri, PendingSettingUri); > > Private->Uri =3D PendingSettingUri; > > ExpectedResponse =3D &PendingSettingResponse; > > } else { > > -- > > 2.34.1 >=20 >=20 >=20 >=20 >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117330): https://edk2.groups.io/g/devel/message/117330 Mute This Topic: https://groups.io/mt/105265503/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-