From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: dandan.bi@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Wed, 18 Sep 2019 18:46:32 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2019 18:46:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,522,1559545200"; d="scan'208";a="212061961" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 18 Sep 2019 18:46:30 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Sep 2019 18:46:31 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.32]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.140]) with mapi id 14.03.0439.000; Thu, 19 Sep 2019 09:46:29 +0800 From: "Dandan Bi" To: Laszlo Ersek , edk2-devel-groups-io CC: "Wu, Hao A" , "Wang, Jian J" , "Gao, Liming" Subject: Re: [PATCH 13/35] MdeModulePkg: PEI Core: clean up "AprioriFile" handling in FindFileEx() Thread-Topic: [PATCH 13/35] MdeModulePkg: PEI Core: clean up "AprioriFile" handling in FindFileEx() Thread-Index: AQHVbZEkixS0DFWDh0C+WV/thuMix6cyPO/g Date: Thu, 19 Sep 2019 01:46:29 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40C5D9E1@SHSMSX104.ccr.corp.intel.com> References: <20190917194935.24322-1-lersek@redhat.com> <20190917194935.24322-14-lersek@redhat.com> In-Reply-To: <20190917194935.24322-14-lersek@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: dandan.bi@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Dandan Bi Thanks, Dandan > -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: Wednesday, September 18, 2019 3:49 AM > To: edk2-devel-groups-io > Cc: Bi, Dandan ; Wu, Hao A ; > Wang, Jian J ; Gao, Liming > Subject: [PATCH 13/35] MdeModulePkg: PEI Core: clean up "AprioriFile" > handling in FindFileEx() >=20 > Clean up two issues around FindFileEx(): >=20 > - The "AprioriFile" parameter's type differs between the function > declaration and the function definition. The correct type is > (EFI_PEI_FILE_HANDLE*). >=20 > - "FfsFileHeader" has type (EFI_FFS_FILE_HEADER*); for clarity, we should > cast it explicitly to EFI_PEI_FILE_HANDLE when assigning it to > (*AprioriFile). >=20 > This is a semantic cleanup, there is no functional change. >=20 > Cc: Dandan Bi > Cc: Hao A Wu > Cc: Jian J Wang > Cc: Liming Gao > Signed-off-by: Laszlo Ersek > --- >=20 > Notes: > lightly tested: OVMF uses APRIORI PEI in the FDF files >=20 > MdeModulePkg/Core/Pei/FwVol/FwVol.h | 2 +- > MdeModulePkg/Core/Pei/FwVol/FwVol.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) >=20 > 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 > ); >=20 > /** > 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 !=3D NULL) { > if (FfsFileHeader->Type =3D=3D EFI_FV_FILETYPE_FREEFORM) { > if (CompareGuid (&FfsFileHeader->Name, &gPeiAprioriFileNameG= uid)) > { > - *AprioriFile =3D FfsFileHeader; > + *AprioriFile =3D (EFI_PEI_FILE_HANDLE)FfsFileHeader; > } > } > } > -- > 2.19.1.3.g30247aa5d201 >=20