[edk2-devel] [PATCH 13/35] MdeModulePkg: PEI Core: clean up "AprioriFile" handling in FindFileEx()
Philippe Mathieu-Daudé
philmd at redhat.com
Tue Sep 24 15:40:46 UTC 2019
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> 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.bi at intel.com>
> Cc: Hao A Wu <hao.a.wu at intel.com>
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Liming Gao <liming.gao at intel.com>
> Signed-off-by: Laszlo Ersek <lersek at 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;
> }
> }
> }
>
Reviewed-by: Philippe Mathieu-Daude <philmd at redhat.com>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#47964): https://edk2.groups.io/g/devel/message/47964
Mute This Topic: https://groups.io/mt/34180214/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list