diff mbox series

[edk2,03/15] ArmVirtPkg/PrePi: remove unused GetPlatformPpi() function

Message ID 20171117160913.17292-4-ard.biesheuvel@linaro.org
State New
Headers show
Series ArmVirtPkg: get rid of ArmPlatformLib | expand

Commit Message

Ard Biesheuvel Nov. 17, 2017, 4:09 p.m. UTC
Remove GetPlatformPpi() from PrePi: it is not used anywhere.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 ArmVirtPkg/PrePi/PrePi.c | 24 --------------------
 1 file changed, 24 deletions(-)

-- 
2.11.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Laszlo Ersek Nov. 21, 2017, 3:36 p.m. UTC | #1
On 11/17/17 17:09, Ard Biesheuvel wrote:
> Remove GetPlatformPpi() from PrePi: it is not used anywhere.

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  ArmVirtPkg/PrePi/PrePi.c | 24 --------------------

>  1 file changed, 24 deletions(-)

> 

> diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c

> index 3679087aec4d..c4fa979c43ef 100755

> --- a/ArmVirtPkg/PrePi/PrePi.c

> +++ b/ArmVirtPkg/PrePi/PrePi.c

> @@ -35,30 +35,6 @@ ProcessLibraryConstructorList (

>    VOID

>    );

>  

> -EFI_STATUS

> -GetPlatformPpi (

> -  IN  EFI_GUID  *PpiGuid,

> -  OUT VOID      **Ppi

> -  )

> -{

> -  UINTN                   PpiListSize;

> -  UINTN                   PpiListCount;

> -  EFI_PEI_PPI_DESCRIPTOR  *PpiList;

> -  UINTN                   Index;

> -

> -  PpiListSize = 0;

> -  ArmPlatformGetPlatformPpiList (&PpiListSize, &PpiList);

> -  PpiListCount = PpiListSize / sizeof(EFI_PEI_PPI_DESCRIPTOR);

> -  for (Index = 0; Index < PpiListCount; Index++, PpiList++) {

> -    if (CompareGuid (PpiList->Guid, PpiGuid) == TRUE) {

> -      *Ppi = PpiList->Ppi;

> -      return EFI_SUCCESS;

> -    }

> -  }

> -

> -  return EFI_NOT_FOUND;

> -}

> -

>  VOID

>  PrePiMain (

>    IN  UINTN                     UefiMemoryBase,

> 


I suggest removing the function declaration as well, from "PrePi.h"
(assuming that's possible). With that:

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

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c
index 3679087aec4d..c4fa979c43ef 100755
--- a/ArmVirtPkg/PrePi/PrePi.c
+++ b/ArmVirtPkg/PrePi/PrePi.c
@@ -35,30 +35,6 @@  ProcessLibraryConstructorList (
   VOID
   );
 
-EFI_STATUS
-GetPlatformPpi (
-  IN  EFI_GUID  *PpiGuid,
-  OUT VOID      **Ppi
-  )
-{
-  UINTN                   PpiListSize;
-  UINTN                   PpiListCount;
-  EFI_PEI_PPI_DESCRIPTOR  *PpiList;
-  UINTN                   Index;
-
-  PpiListSize = 0;
-  ArmPlatformGetPlatformPpiList (&PpiListSize, &PpiList);
-  PpiListCount = PpiListSize / sizeof(EFI_PEI_PPI_DESCRIPTOR);
-  for (Index = 0; Index < PpiListCount; Index++, PpiList++) {
-    if (CompareGuid (PpiList->Guid, PpiGuid) == TRUE) {
-      *Ppi = PpiList->Ppi;
-      return EFI_SUCCESS;
-    }
-  }
-
-  return EFI_NOT_FOUND;
-}
-
 VOID
 PrePiMain (
   IN  UINTN                     UefiMemoryBase,