public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chang, Abner via groups.io" <abner.chang=amd.com@groups.io>
To: Nickle Wang <nicklew@nvidia.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Igor Kulchytskyy <igork@ami.com>
Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg/Features: Variable used before being initialized
Date: Tue, 2 Apr 2024 05:03:59 +0000	[thread overview]
Message-ID: <LV8PR12MB9452BFB5A14CA6B7952772A5EA3E2@LV8PR12MB9452.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20240401143741.51236-1-nicklew@nvidia.com>

[AMD Official Use Only - General]

Hi Nickle,
Use Uri makes sense to me. Thanks! Please go ahead to merge it.
Reviewed-by: Abner Chang <abner.chang@amd.com>.

> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Monday, April 1, 2024 10:38 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>
> 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 SetRedfishSettingsObjectsUri()
> but it is used in SetRedfishSettingsObjectsUri function. Use input
> parameter "Uri" instead.
>
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> ---
>  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     = PendingSettingUri;
>      ExpectedResponse = &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     = PendingSettingUri;
>      ExpectedResponse = &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     = PendingSettingUri;
>      ExpectedResponse = &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     = PendingSettingUri;
>      ExpectedResponse = &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     = PendingSettingUri;
>      ExpectedResponse = &PendingSettingResponse;
>    } else {
> --
> 2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-04-02  5:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 14:37 [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg/Features: Variable used before being initialized Nickle Wang via groups.io
2024-04-02  5:03 ` Chang, Abner via groups.io [this message]
2024-04-02  6:57   ` Nickle Wang via groups.io

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=LV8PR12MB9452BFB5A14CA6B7952772A5EA3E2@LV8PR12MB9452.namprd12.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