From 08c77cce0edd80547a527304c6b4a75e2de2ac9e Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Thu, 21 May 2020 00:58:39 +0200 Subject: [PATCH] OvmfPkg/Tcg2ConfigPei: clean up some lib class dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit 89236992913f introduced an explicit Tpm12CommandLib dependency to Tcg2ConfigPei. In reality this lib class is not consumed by Tcg2ConfigPei at all (such a dependency is not even inherited from other lib instances). Simplify the module by dropping the superfluous dependency. (The Tpm12CommandLib class resolution that was also added in commit 89236992913f is not useless, at the platform build level: it is consumed by TcgPei and TcgDxe. Meaning that said Tpm12CommandLib resolution should have likely been a part of the subsequent patch in the original series, namely commit 6be54f15a0c9.) Commit 89236992913f also introduced SwapBytesXx() calls. Those functions are provided by BaseLib. Spell out the BaseLib dependency. Functionally, this patch is a no-op. Cc: Ard Biesheuvel Cc: Eric Auger Cc: Jordan Justen Cc: Marc-André Lureau Cc: Philippe Mathieu-Daudé Cc: Simon Hardy Cc: Stefan Berger Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2728 Signed-off-by: Laszlo Ersek Message-Id: <20200520225841.17793-2-lersek@redhat.com> Reviewed-by: Ard Biesheuvel Tested-by: Ard Biesheuvel --- OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 2 +- OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf index 97c529c91d..b79d0a3fb9 100644 --- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf +++ b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf @@ -30,9 +30,9 @@ [LibraryClasses] PeimEntryPoint + BaseLib DebugLib PeiServicesLib - Tpm12CommandLib Tpm12DeviceLib Tpm2DeviceLib diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c index 5b5075bded..44abd6c541 100644 --- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c +++ b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c @@ -15,11 +15,11 @@ #include #include +#include #include #include #include #include -#include #include STATIC CONST EFI_PEI_PPI_DESCRIPTOR mTpmSelectedPpi = { -- 2.39.2