Reviewed-by: Dandan Bi <[email protected]> Thanks, Dandan
> -----Original Message----- > From: Laszlo Ersek [mailto:[email protected]] > Sent: Wednesday, September 18, 2019 3:49 AM > To: edk2-devel-groups-io <[email protected]> > Cc: Bi, Dandan <[email protected]>; Wu, Hao A <[email protected]>; > Wang, Jian J <[email protected]>; Gao, Liming <[email protected]> > 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 <[email protected]> > Cc: Hao A Wu <[email protected]> > Cc: Jian J Wang <[email protected]> > Cc: Liming Gao <[email protected]> > Signed-off-by: Laszlo Ersek <[email protected]> > --- > > 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: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
