public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Eric Dong <eric.dong@intel.com>, edk2-devel@lists.01.org
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Subject: Re: [Patch v2 2/2] UefiCpuPkg/RegisterCpuFeaturesLib: Remove useless function.
Date: Wed, 26 Dec 2018 23:03:58 +0100	[thread overview]
Message-ID: <306755e8-a2c9-baa7-7b2f-59230577c6b2@redhat.com> (raw)
In-Reply-To: <20181224021236.12976-3-eric.dong@intel.com>

On 12/24/18 03:12, Eric Dong wrote:
> Directly call the API instead of create function for it.
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1411
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
> ---
>  .../PeiRegisterCpuFeaturesLib.c                    | 35 +++++-----------------
>  1 file changed, 8 insertions(+), 27 deletions(-)
> 
> diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
> index 0bbcb50181..fdd0791c89 100644
> --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
> +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
> @@ -67,32 +67,6 @@ GetCpuFeaturesData (
>    return CpuInitData;
>  }
>  
> -/**
> -  Worker function to get MP PPI service pointer.
> -
> -  @return PEI PPI service pointer.
> -**/
> -EFI_PEI_MP_SERVICES_PPI *
> -GetMpPpi (
> -  VOID
> -  )
> -{
> -  EFI_STATUS                 Status;
> -  EFI_PEI_MP_SERVICES_PPI    *CpuMpPpi;
> -
> -  //
> -  // Get MP Services Protocol
> -  //
> -  Status = PeiServicesLocatePpi (
> -             &gEfiPeiMpServicesPpiGuid,
> -             0,
> -             NULL,
> -             (VOID **)&CpuMpPpi
> -             );
> -  ASSERT_EFI_ERROR (Status);
> -  return CpuMpPpi;
> -}
> -
>  /**
>    Worker function to return processor index.
>  
> @@ -139,7 +113,14 @@ GetProcessorInformation (
>    EFI_PEI_MP_SERVICES_PPI    *CpuMpPpi;
>    EFI_STATUS                 Status;
>  
> -  CpuMpPpi = GetMpPpi ();
> +  Status = PeiServicesLocatePpi (
> +             &gEfiPeiMpServicesPpiGuid,
> +             0,
> +             NULL,
> +             (VOID **)&CpuMpPpi
> +             );
> +  ASSERT_EFI_ERROR (Status);
> +
>    Status = CpuMpPpi->GetProcessorInfo (
>                 GetPeiServicesTablePointer(),
>                 CpuMpPpi,
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


      reply	other threads:[~2018-12-26 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-24  2:12 [Patch v2 0/2] Avoid AP calls PeiService Eric Dong
2018-12-24  2:12 ` [Patch v2 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: " Eric Dong
2018-12-26 22:16   ` Laszlo Ersek
2018-12-24  2:12 ` [Patch v2 2/2] UefiCpuPkg/RegisterCpuFeaturesLib: Remove useless function Eric Dong
2018-12-26 22:03   ` Laszlo Ersek [this message]

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=306755e8-a2c9-baa7-7b2f-59230577c6b2@redhat.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