From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Tue, 17 Sep 2019 12:50:11 -0700 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 94975308FC4A; Tue, 17 Sep 2019 19:50:11 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-37.rdu2.redhat.com [10.10.120.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21394600C4; Tue, 17 Sep 2019 19:50:09 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Dandan Bi , Hao A Wu , Jian J Wang , Liming Gao Subject: [PATCH 13/35] MdeModulePkg: PEI Core: clean up "AprioriFile" handling in FindFileEx() Date: Tue, 17 Sep 2019 21:49:13 +0200 Message-Id: <20190917194935.24322-14-lersek@redhat.com> In-Reply-To: <20190917194935.24322-1-lersek@redhat.com> References: <20190917194935.24322-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 17 Sep 2019 19:50:11 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 Cc: Hao A Wu Cc: Jian J Wang Cc: Liming Gao Signed-off-by: Laszlo Ersek --- 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 ); =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; } } } --=20 2.19.1.3.g30247aa5d201