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 C3EA7D80056 for ; Tue, 2 Apr 2024 05:04:06 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=GzX58o1kYtciPkTGMP0g/NiBFiN3ml8oqWXQiu3rQwM=; 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=1712034245; v=1; b=3V0YupZzQ1UfimntznK7aoWRZPeSc/3fWMh3QvafSacCHiB8V3YN036cyJD8MW1SYZeYpQJs pDd59bUU+AHoCn8QmwysAe/Z6OOV+2B6Kjbhy6peisjmiXKs3058A17Zs/eyp4rY9oCZooS2Rh2 uJXfYIAPIK/kCcpuSJowAIkJJemRNKnjrfuzyGyQTRk4NED4pz/5f7o4PiWXFLjWVzTBs5WpllD qfVgXuBPIghua5zFJu87kcBRmJ4x91N3avBGPCzQvuT6gXqBfTBUFaD2GCfjGWSXzewd0agrHLt Di+APBJFz3aNFWEEc7vf8ajB+onyq+bckrrp8ZLFokQpg== X-Received: by 127.0.0.2 with SMTP id u18SYY7687511x6Fena8Huwu; Mon, 01 Apr 2024 22:04:05 -0700 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.136]) by mx.groups.io with SMTP id smtpd.web10.5181.1712034244625937916 for ; Mon, 01 Apr 2024 22:04:04 -0700 X-Received: from LV8PR12MB9452.namprd12.prod.outlook.com (2603:10b6:408:200::8) by CH3PR12MB8510.namprd12.prod.outlook.com (2603:10b6:610:15b::10) 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 05:03:59 +0000 X-Received: from LV8PR12MB9452.namprd12.prod.outlook.com ([fe80::e006:4173:de2c:aca0]) by LV8PR12MB9452.namprd12.prod.outlook.com ([fe80::e006:4173:de2c:aca0%5]) with mapi id 15.20.7409.042; Tue, 2 Apr 2024 05:03:59 +0000 From: "Chang, Abner via groups.io" 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 Thread-Topic: [edk2-redfish-client][PATCH] RedfishClientPkg/Features: Variable used before being initialized Thread-Index: AQHahEI2MNiZvyyj9UisnxKgo55VmrFUbThQ Date: Tue, 2 Apr 2024 05:03:59 +0000 Message-ID: References: <20240401143741.51236-1-nicklew@nvidia.com> In-Reply-To: <20240401143741.51236-1-nicklew@nvidia.com> Accept-Language: en-US, zh-CN 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: LV8PR12MB9452:EE_|CH3PR12MB8510:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: +MI92ugWiaiyjUrHUWcLcJv9vcrO9EKs4GjBCd2lCXHJksGuSi73/7VjM+Y3satpxKYHUQg6q1yAfigbI352BvlZNOVRFbcwsc3QQNoLwAq1BG9FBOAhaaV+aLfVm926ufx3XvTawMc69J/ryJ/OpfG8zihK50XEt5elh5kHTUH0XvJxB+wXE+h8jy3ye6bq+S7uNG3E9qB2JfP5xui2S4FLHf52o3ZJSovz3ySET6pubIv7sj/Pd9CA7A4bg9DE/p1Zzk0VF/0nU3iRa3UKTFI5GyxkHVQCQBR1m3bykiL59aSY2OM6qVqyOsm2hH8+zNhBilVfcQkPldUcRreFg2NTr5nUBOGQE8stMnQ1D6LcZF9wj42dPKAPRsbPuTqrQlKLGO08Y2K28iTrrx5l+quLEid/IvIaJpICx4asoBRwQHl/dfzHHdcb1IX+0fMGckcRxCUQa0pGm4S5aekKafYVffCUUrWpSkDaybz4TrYyZX0pUxj+k3nhRQrD7FMevsIK2wPg5iKbD8tnmRVdNTaitXWHGr97eWmaOgyjY0XAczBdaF1r6RJ5nFd46BfR3q0gyTog1xd8Aw1zaKW5Si24TEDCyYSk+x8JFpPqsysk00TJUExPUpT7tPHh3/thDTjt9zvMF7/k+uPjsXXSJuegIelTOAT+SrS5M22rd04= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5O0pd5lZ7kQnq9jyT62/2nZWy6da1QE3esJMybMq6yAb8CtCG20tOdbejljQ?= =?us-ascii?Q?of3uJz72FKG0bqXcsNBbekC9JKIBNbtRe67+XlXBYlru/PQHWqEY3n9hGkRS?= =?us-ascii?Q?mW/QExtGez4pMU3XxQPxEqy3koQO9sNGa25/9eYtfeGT8uD2eBpnMeTLzk+D?= =?us-ascii?Q?QUHExw5ptmbMunXQmr8I45UFz0EWGzSxXr0BX52rUDU6Gumc94qJd+DMrRSW?= =?us-ascii?Q?Ve6loW0/Ft/Fr/CSIEJFV9dcfY8stQDn2W6H4qvHh4i8d7Tx0yyW9E6ulB1S?= =?us-ascii?Q?F6Syy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1aYGxk3XXUS2Ovv6iLVt?= =?us-ascii?Q?bLCNRrYFQEK+LATnGRrGuAzp9zxnCjRqwL7bivfMJzGbhuTHCgQyGUaEjwQj?= =?us-ascii?Q?xsEt0muqu5xglxmtlUrMk7C8OsRZ8he3kxj3S1b9jWYbG0RSJ7oOCBXHVUqU?= =?us-ascii?Q?qVeYo7W+l323OyNAPBSWJ+oLGfTKshxlg5ejIqlP8fZe4FQlF4RMfpZVyaoa?= =?us-ascii?Q?4uENEUqE9W327kPz0WAA1JY7UUempT8vJrKhYhQbQ+FpaTbRHHy3Qyn/c7Yu?= =?us-ascii?Q?tP+M48FRi1s7zrg8ZsIwTlk4cOEA58b4X57MeUuFuuz9i3vUFcTQxuInycNi?= =?us-ascii?Q?QFmMOEnliPZVm2j6YCVhaiK/PgaCJnCpn+EdIAFHlTBXVAF4mgIKxtNrTrzx?= =?us-ascii?Q?26UxjeeMFRdEZ+06PeM=3D?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9452.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6cdc9ce8-f0a3-4854-f665-08dc52d24e5d X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2024 05:03:59.0982 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FZQmh7zq/XQNqiZsa3G+thqXa5SlohhQ/4l7Q0NJg6gX79Z2YMAvT//fxNh7UsOnDIsD0seXun6bVLggbtTCFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8510 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 22:04:04 -0700 Resent-From: abner.chang@amd.com Reply-To: devel@edk2.groups.io,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: V3L46k3OD4OhuW51PQVmVeo0x7686176AA= 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=3V0YupZz; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=pass (policy=none) header.from=groups.io [AMD Official Use Only - General] Hi Nickle, Use Uri makes sense to me. Thanks! Please go ahead to merge it. Reviewed-by: Abner Chang . > -----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 caut= ion > when opening attachments, clicking links, or responding. > > > Private->Uri is initialized after calling 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 -=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 (#117325): https://edk2.groups.io/g/devel/message/117325 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-