From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web10.2019.1590087176275014458 for ; Thu, 21 May 2020 11:52:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=T3TF/FJr; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590087175; 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=IpYHgiqTBtCza7ksN3DcIZzHJpnR0uAiy2pqxckrMq4=; b=T3TF/FJr0bTxakm9jtIY724CTnlEI0x0/UaaoldpktvaPV6tpEI9J/nH5MvD9qvhQaEKqr uYpNh7rhKjYKI60E+U1foAMFmjDAeuLqWmqZMScuAYa8pIKvp/FwDa/cSRQn//Usaczb9M E2mjZoRa1VMUSJPM4FVXrgi/Q6Au2ME= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-363-hSeEUwvFN5KN5i2zNqnQcA-1; Thu, 21 May 2020 14:52:49 -0400 X-MC-Unique: hSeEUwvFN5KN5i2zNqnQcA-1 Received: by mail-wm1-f72.google.com with SMTP id z5so19765wml.6 for ; Thu, 21 May 2020 11:52:49 -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=IpYHgiqTBtCza7ksN3DcIZzHJpnR0uAiy2pqxckrMq4=; b=Jm6Pgt5tCZTKkEI+bNhJ5gHGKaxh7ay8n67MIag9Aiqq2IVGHOD9U6k7evUsmwXfS2 RXthgTiSHqg1GqZ/rcE74+OOMvChfQE+sWATR8xNxBkguR952qGKTKUlTPhgc7axq72i jO5B6Lc+MdZj20lbSIMkl8uwfgwcF+jdd1Al0djPPDhx0tuRTYpHM3ERnREiOHM1DzHS mAIuq8dtCigPhec9qI5oaeUPljMDnTUQHUhK/lpAWRXMsgzzVur/QN4aSJMb+bbovg8s V3aQEQObUsVYuKMcJuQQ3468z71otNps58vB9aaxjhv4+8f2nIzGQzFMGt+KFGAxUbYJ 6Vrw== X-Gm-Message-State: AOAM530eNznTW6w9poVl+C7+gXCPXg8aP3mgjoAyvzafGsgwK960ILgX 1vgKvkb5nmnTNueflCwfRiPbcHng/dR3FwOK92w3Uz5JdM0Ik+Cg2Lxedew7etfy4WEP7wnULti pEp0cqkoZwEwzfA== X-Received: by 2002:adf:ecc8:: with SMTP id s8mr10008wro.279.1590087168714; Thu, 21 May 2020 11:52:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFRDzyxk2CunChJLf5iESuGl7nz12u8ApE6XinvZtG6fI72nSq4IVmcJOC+uxgsO8nNMjUyQ== X-Received: by 2002:adf:ecc8:: with SMTP id s8mr9991wro.279.1590087168496; Thu, 21 May 2020 11:52:48 -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 s15sm7292548wro.80.2020.05.21.11.52.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 May 2020 11:52:47 -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> <495e4d6a-696f-4232-68e1-23a54249655e@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <3b876ee2-d8fb-aa39-cc52-56913384f2a0@redhat.com> Date: Thu, 21 May 2020 20:52:46 +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: <495e4d6a-696f-4232-68e1-23a54249655e@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 8:04 PM, Laszlo Ersek wrote: > Hi Phil, > > On 05/21/20 12:29, Philippe Mathieu-Daudé wrote: >> 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 >> > > I'm extremely sorry for missing your R-b's. When I read your email with > msgid <60493dcc-0832-1fb3-f380-867410691672@redhat.com>, and > consequently decided that I'd go ahead with the feedback provided thus > far, I didn't realize you were going to review the series as well! I > switched off my email refresh very soon after. > > Normally I let a series sit for at least a day (24 hours) on the list, > so that everyone (in different timezones too) can at least state an > intent (even in private) to review or test the series. I encourage other > maintainers to do the same, and I've complained in the past when I would > have liked to review or test a series but wasn't given enough time even > to signal my interest. > > So this is totally my fault. My only excuse is that the feature > freeze(s) are upon us, and fixing stuff feels "urgent". I wish we could > append release candidates (RCs) "on-demand", like QEMU does. > > I'm sorry! And thank you for your review. Don't worry, no problem! This was an easy refactor to review. As it is a buildfix I wanted to review it ASAP so it get merged for the freeze. I'm glad it is merged. > > Laszlo >