tpm: Reduce duplication in a few functions
authorSimon Glass <sjg@chromium.org>
Sat, 6 Feb 2021 21:23:38 +0000 (14:23 -0700)
committerTom Rini <trini@konsulko.com>
Tue, 2 Mar 2021 20:53:37 +0000 (15:53 -0500)
commit1bea7cc430316674dfe3dd44b6bb53c38c4946cd
tree8a3794f3393369965ea0b520d78211144a728b7d
parentb8eb9210e778cbc2ec2e1868f71a2ce5a883d5c3
tpm: Reduce duplication in a few functions

Update tpm2_clear() and tpm2_pcr_extend() so that the command size
is not repeated twice. Add a small comment to the latter.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/tpm-v2.c