Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jeCsD-0001I1-Vz for mharc-grub-devel@gnu.org; Thu, 28 May 2020 03:22:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeCsD-0001HH-7o for grub-devel@gnu.org; Thu, 28 May 2020 03:22:41 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:43363 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jeCsC-0007bK-E6 for grub-devel@gnu.org; Thu, 28 May 2020 03:22:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590650559; 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=9IEuSym+IuV83ABFGvQq9Kj6hg8LiSkqfWD8qxTTiDs=; b=YJg23+gDoa+yXx5OFntbvVYQFwvYRAsn8by0axGJr+vHVtiRa1FVV21NLyvzaD+DClSuiv E4xHkg/9X5E4MwSLxnK4YrUWOaIbZxXO51ZJEWCppV08dxMEfMkDu7Go53pfkQnqPTkbqV 9eHoKHSTDHDZyvYY0Ra4ZPSNVgg3LAE= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-491-n3bQv_jLMXSV3o6c2rdqjQ-1; Thu, 28 May 2020 03:22:38 -0400 X-MC-Unique: n3bQv_jLMXSV3o6c2rdqjQ-1 Received: by mail-wr1-f72.google.com with SMTP id c14so11061931wrm.15 for ; Thu, 28 May 2020 00:22:37 -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=9IEuSym+IuV83ABFGvQq9Kj6hg8LiSkqfWD8qxTTiDs=; b=Fieyj69xf7FvuN+lWO5MdGI/UqFmFotlkd4LhGDTpeE6zFuTRrKlsX1l41YIfo6+pl NGr+2M2+kaPfvq7Kd76mIlOdz0vtIKEWm4rgm2ELLpdFbgz0r8T2D0UHLdJgoUJZgXl2 Y1JS6qJYR+3JinU1RLXNLNm2be+QkfS2fbcKN69HWYHG5HmGmDAvPlQoCk7jCGxPSot7 pBmXZ87wyOwhkHU9JeNp12Bcjfq04T/b6bFJhumdCp3oiaG5mrU8MwY9G699YG0OL/e4 RrA1MSse5LxoUuJpaTXp2gsXq2Rj6W36AIOwMsUFNK4vesyl1AO/1XaybeiTd2QkR6mq 8VRg== X-Gm-Message-State: AOAM531YFnDaFkuN0+QGUj92m+kXUR2TM6YJPpw8BLDxKf5DE00DT5TO b3J7aClHh3sV0E9fs3kSGyqX54F9i2lPFaODHEOrACb9EZWeXnHtsbdg3aVSQAd/8o57nU7uF7h 0cElfnRM3rAg= X-Received: by 2002:a05:600c:2c4b:: with SMTP id r11mr15234wmg.144.1590650556913; Thu, 28 May 2020 00:22:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx8grZJzdO43v8olh2zlHyiPNUj6RdKSpqua2S/TtRKJ9OCvp60pGbSnGWiR/iXujXqUdD8A== X-Received: by 2002:a05:600c:2c4b:: with SMTP id r11mr15206wmg.144.1590650556704; Thu, 28 May 2020 00:22:36 -0700 (PDT) Received: from ?IPv6:2a01:c50f:ab80:6700:527f:85b3:5615:ff0b? ([2a01:c50f:ab80:6700:527f:85b3:5615:ff0b]) by smtp.gmail.com with ESMTPSA id t14sm5165651wrb.94.2020.05.28.00.22.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 May 2020 00:22:36 -0700 (PDT) Subject: Re: [PATCH 4/6] tpm: Drop unneeded code To: Daniel Kiper , grub-devel@gnu.org Cc: cjwatson@ubuntu.com, higgi1pt@gmail.com, fsf@martin-whitaker.me.uk, mailing-lists@martin-whitaker.me.uk, mjg59@srcf.ucam.org, olaf@aepfle.de, phcoder@gmail.com References: <20200525190215.16390-1-daniel.kiper@oracle.com> <20200525190215.16390-5-daniel.kiper@oracle.com> From: Javier Martinez Canillas Message-ID: <4ed69a2c-8b48-d477-00a2-12424cfd477b@redhat.com> Date: Thu, 28 May 2020 09:22:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200525190215.16390-5-daniel.kiper@oracle.com> Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=207.211.31.81; envelope-from=javierm@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/28 02:50:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 07:22:41 -0000 On 5/25/20 9:02 PM, Daniel Kiper wrote: > Drop unused grub_tpm*_execute() and declaration of nonexistent grub_tpm_init(). > > Signed-off-by: Daniel Kiper > --- [snip] > -static grub_err_t > -grub_tpm2_execute (grub_efi_handle_t tpm_handle, > - PassThroughToTPM_InputParamBlock *inbuf, > - PassThroughToTPM_OutputParamBlock *outbuf) > -{ > - grub_efi_status_t status; > - grub_efi_tpm2_protocol_t *tpm; > - grub_uint32_t inhdrsize = sizeof (*inbuf) - sizeof (inbuf->TPMOperandIn); > - grub_uint32_t outhdrsize = > - sizeof (*outbuf) - sizeof (outbuf->TPMOperandOut); > - > - tpm = grub_efi_open_protocol (tpm_handle, &tpm2_guid, > - GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL); > - > - if (!grub_tpm2_present (tpm)) > - return 0; > - > - /* UEFI TPM protocol takes the raw operand block, no param block header. */ > - status = efi_call_5 (tpm->submit_command, tpm, > - inbuf->IPBLength - inhdrsize, inbuf->TPMOperandIn, > - outbuf->OPBLength - outhdrsize, outbuf->TPMOperandOut); > - I think this would be useful if we ever add support for sending TPM commands. But I agree that should be removed since is unused and can always be brought back from the git history if needed. Reviewed-by: Javier Martinez Canillas Best regards, -- Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat