grub-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]