From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web10.3075.1590057010313974175 for ; Thu, 21 May 2020 03:30:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h7JiXTgS; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590057009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KXE8uKMcmzW8rQ6Cn0ikL7k8HipeFJrO4ih3aXi2Em4=; b=h7JiXTgSyRkYD0MqhQkbh3FRrXIwKQ3oebXpYMHwugIWNqrZywLw02hWNM945VNyOxMum7 oAo1gGZKplZaJ2PQQeZhEbxMs8pzhhXK7pqa8+YxBgVn4OMdAq1HChdT98y7bPJxhJTykP zudb1xzXyLpi3bPRNdjE+kVwRzuDJs4= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-4-YIfUOb2XOr26OiW6kcygkQ-1; Thu, 21 May 2020 06:30:03 -0400 X-MC-Unique: YIfUOb2XOr26OiW6kcygkQ-1 Received: by mail-wm1-f70.google.com with SMTP id f62so2553135wme.3 for ; Thu, 21 May 2020 03:30:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KXE8uKMcmzW8rQ6Cn0ikL7k8HipeFJrO4ih3aXi2Em4=; b=fcyl49hBpyJeAaxBpk1todTtd7CpTKHS4vwdPOdzXLG0zX33vylKEy0cdtb4iprzDC IzZgM2SMFrF+5+2KhTynRWKiVLUu8qnXBk5psi3zrv1Wsl7+TA8kO/r24sQAjnk6iiUt PcYs4Kh5HrtIpH9wOQoreP/88Pyy0Vvl7hA41UzfIH2BN4Rrc6xwuBiZ8M2CJlNIHAJd ZEVMOD8u2RY/UgkKWXYlxRx7ublLqUo6U+Dd8MQOCRAlGfogu5rG54OjEUG05oSM6qBu nCtN2ut5RJQe6jwe13sEqu5RMn9YeI/5WbFotRr8bZuNu0vCvltmit3rCt8l28hT8syb YsqA== X-Gm-Message-State: AOAM532YTqFJTR3chgbEJFA1oze2X6Id1M+FgosdTTT2+3hD8GVK9b6M UQ8Ng1LsTDr3mOCaqtWdoRPOBL6hv2c7a945OVRvdfkJac67JwVu7pO7vPvSpwp/1HKnNZl7GKh sr9SvMq5Ku8GLew== X-Received: by 2002:a05:6000:4:: with SMTP id h4mr7803356wrx.36.1590057001832; Thu, 21 May 2020 03:30:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPrjsKp1OnMYdFkhrIwCfxOLU439pOd1JBfB+X796KlvDypH3NTAjoJQdozqN0vz5BRisISg== X-Received: by 2002:a05:6000:4:: with SMTP id h4mr7803328wrx.36.1590057001554; Thu, 21 May 2020 03:30:01 -0700 (PDT) Return-Path: Received: from [192.168.1.40] (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id i6sm6831667wmb.41.2020.05.21.03.30.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 May 2020 03:30:00 -0700 (PDT) Subject: Re: [PATCH 1/3] OvmfPkg/Tcg2ConfigPei: clean up some lib class dependencies To: Laszlo Ersek , edk2-devel-groups-io Cc: Ard Biesheuvel , Eric Auger , Jordan Justen , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Simon Hardy , Stefan Berger References: <20200520225841.17793-1-lersek@redhat.com> <20200520225841.17793-2-lersek@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: Date: Thu, 21 May 2020 12:29:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200520225841.17793-2-lersek@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 5/21/20 12:58 AM, Laszlo Ersek wrote: > 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 > --- > 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 97c529c91d0b..b79d0a3fb912 100644 > --- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf > +++ b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf > @@ -30,9 +30,9 @@ [Packages] > > [LibraryClasses] > PeimEntryPoint > + BaseLib > DebugLib > PeiServicesLib > - Tpm12CommandLib > Tpm12DeviceLib > Tpm2DeviceLib > > diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c > index 5b5075bded92..44abd6c541f9 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 = { > Reviewed-by: Philippe Mathieu-Daude