Reviewed-by: Dandan Bi <dandan...@intel.com>

Thanks,
Dandan

> -----Original Message-----
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Wednesday, September 18, 2019 3:49 AM
> To: edk2-devel-groups-io <devel@edk2.groups.io>
> Cc: Bi, Dandan <dandan...@intel.com>; Wu, Hao A <hao.a...@intel.com>;
> Wang, Jian J <jian.j.w...@intel.com>; Gao, Liming <liming....@intel.com>
> Subject: [PATCH 13/35] MdeModulePkg: PEI Core: clean up "AprioriFile"
> handling in FindFileEx()
> 
> Clean up two issues around FindFileEx():
> 
> - The "AprioriFile" parameter's type differs between the function
>   declaration and the function definition. The correct type is
>   (EFI_PEI_FILE_HANDLE*).
> 
> - "FfsFileHeader" has type (EFI_FFS_FILE_HEADER*); for clarity, we should
>   cast it explicitly to EFI_PEI_FILE_HANDLE when assigning it to
>   (*AprioriFile).
> 
> This is a semantic cleanup, there is no functional change.
> 
> Cc: Dandan Bi <dandan...@intel.com>
> Cc: Hao A Wu <hao.a...@intel.com>
> Cc: Jian J Wang <jian.j.w...@intel.com>
> Cc: Liming Gao <liming....@intel.com>
> Signed-off-by: Laszlo Ersek <ler...@redhat.com>
> ---
> 
> Notes:
>     lightly tested: OVMF uses APRIORI PEI in the FDF files
> 
>  MdeModulePkg/Core/Pei/FwVol/FwVol.h | 2 +-
> MdeModulePkg/Core/Pei/FwVol/FwVol.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.h
> b/MdeModulePkg/Core/Pei/FwVol/FwVol.h
> index 4082cfbec1f8..ca80e84e0fcb 100644
> --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.h
> +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.h
> @@ -299,7 +299,7 @@ FindFileEx (
>    IN  CONST EFI_GUID                 *FileName,   OPTIONAL
>    IN        EFI_FV_FILETYPE          SearchType,
>    IN OUT    EFI_PEI_FILE_HANDLE      *FileHandle,
> -  IN OUT    EFI_PEI_FV_HANDLE        *AprioriFile  OPTIONAL
> +  IN OUT    EFI_PEI_FILE_HANDLE      *AprioriFile  OPTIONAL
>    );
> 
>  /**
> diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c
> b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
> index 709db00694c2..f4642c47c13a 100644
> --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c
> +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
> @@ -407,7 +407,7 @@ FindFileEx (
>          } else if (AprioriFile != NULL) {
>            if (FfsFileHeader->Type == EFI_FV_FILETYPE_FREEFORM) {
>              if (CompareGuid (&FfsFileHeader->Name, &gPeiAprioriFileNameGuid))
> {
> -              *AprioriFile = FfsFileHeader;
> +              *AprioriFile = (EFI_PEI_FILE_HANDLE)FfsFileHeader;
>              }
>            }
>          }
> --
> 2.19.1.3.g30247aa5d201
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47516): https://edk2.groups.io/g/devel/message/47516
Mute This Topic: https://groups.io/mt/34180214/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to