public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <leif@nuviainc.com>
To: Rebecca Cran <rebecca@nuviainc.com>
Cc: devel@edk2.groups.io, Ard Biesheuvel <ardb+tianocore@kernel.org>
Subject: Re: [PATCH v2 2/3] ArmPkg: Rename some functions and parameters in OemMiscLib
Date: Mon, 22 Feb 2021 12:35:21 +0000	[thread overview]
Message-ID: <20210222123521.GR1664@vanye> (raw)
In-Reply-To: <60e89245-a027-d082-9ece-bc9fed791583@nuviainc.com>

On Sun, Feb 21, 2021 at 16:04:31 -0700, Rebecca Cran wrote:
> On 2/21/21 2:21 PM, Leif Lindholm wrote:
> > On Sat, Feb 20, 2021 at 20:28:59 -0700, Rebecca Cran wrote:

(Adding necessary patch context back in - please don't strip out until
absolutely certain it is irrelevant to conversation.)

diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c
index e6adbceba2d5..fc4dba319aad 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c
@@ -23,27 +23,6 @@

#include "SmbiosMisc.h"

-/**
- * Returns the chassis type in SMBIOS format.
- *
- * @return Chassis type
-**/

> > > -UINT8
> > > -GetChassisType (
> > > -  VOID
> > > -  )
> > > -{
> > > -  EFI_STATUS                      Status;
> > > -  UINT8                           ChassisType;
> > > -
> > > -  Status = OemGetChassisType (&ChassisType);
> > > -  if (EFI_ERROR (Status)) {
> > > -    return 0;
> > > -  }
> > > -
> > > -  return ChassisType;
> > > -}
> > > -
> > 
> > This function is outright deleted, not renamed.
> > Does this belong in another patch?
> 
> I think it belongs here: it was just a helper function for when
> OemGetChassisType returned EFI_STATUS. Since it now returns the same data as
> this function, we don't need it anymore.

This patch, according to its title and commit message, does renaming.

The refactoring should then be moved over to 3/3, together with this
hunk:

@@ -165,10 +142,7 @@
SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer)

   SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE3) + SmbiosRecord->ExtendLength + 1;

-  ChassisType = GetChassisType ();
-  if (ChassisType != 0) {
-    SmbiosRecord->Type  = ChassisType;
-  }
+  SmbiosRecord->Type = OemGetChassisType ();

   //ContainedElements
   ASSERT (ContainedElementCount < 2);

The current layout means this code (in 2/3) relies on the API change
introduced in 3/3.

/
    Leif

> 
> -- 
> Rebecca Cran

  reply	other threads:[~2021-02-22 12:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-21  3:28 [PATCH v2 0/3] ArmPkg: Fix several issues in OemMiscLib Rebecca Cran
2021-02-21  3:28 ` [PATCH v2 1/3] ArmPkg: Fix ordering of return type and EFIAPI specifier " Rebecca Cran
2021-02-21 20:48   ` Leif Lindholm
2021-02-21  3:28 ` [PATCH v2 2/3] ArmPkg: Rename some functions and parameters " Rebecca Cran
2021-02-21 21:21   ` Leif Lindholm
2021-02-21 23:04     ` Rebecca Cran
2021-02-22 12:35       ` Leif Lindholm [this message]
2021-02-22 14:33         ` Rebecca Cran
2021-02-21  3:29 ` [PATCH v2 3/3] ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPE Rebecca Cran
2021-02-21 21:36   ` Leif Lindholm

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=20210222123521.GR1664@vanye \
    --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