[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/6] tpm: Drop unneeded code
From: |
Javier Martinez Canillas |
Subject: |
Re: [PATCH 4/6] tpm: Drop unneeded code |
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 |
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 <daniel.kiper@oracle.com>
> ---
[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 <javierm@redhat.com>
Best regards,
--
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement
Red Hat
- [PATCH 0/6] GRUB: Bundle of various fixes and cleanups, Daniel Kiper, 2020/05/25
- [PATCH 2/6] net/http: Return an error on HTTP error responses, Daniel Kiper, 2020/05/25
- [PATCH 6/6] efi/tpm: Fix typo in grub_efi_tpm2_protocol struct, Daniel Kiper, 2020/05/25
- [PATCH 4/6] tpm: Drop unneeded code, Daniel Kiper, 2020/05/25
- Re: [PATCH 4/6] tpm: Drop unneeded code,
Javier Martinez Canillas <=
- [PATCH 1/6] grub-install: Fix inverted test for NLS enabled when copying locales, Daniel Kiper, 2020/05/25
- [PATCH 3/6] docs: Fix devicetree command description, Daniel Kiper, 2020/05/25
- [PATCH 5/6] i386/efi/init: Drop bogus include, Daniel Kiper, 2020/05/25