lkml.org 
[lkml]   [2016]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tpm: remove redundant code from self-test functions
On Wed, Mar 30, 2016 at 11:46:23PM -0600, Jason Gunthorpe wrote:
> On Wed, Mar 30, 2016 at 04:20:45PM +0300, Jarkko Sakkinen wrote:
>
> > - rc = be32_to_cpu(cmd.header.out.return_code);
> > if (rc == TPM_ERR_DISABLED || rc == TPM_ERR_DEACTIVATED) {
>
> This line is the entire reason it is open coded, I see it being
> removed, but I don't see how the functionality is maintained?

When tpm_trance_cmd() returns a positive number it is the TPM error code
that it returns. tpm_pcr_read() does pass through whatever
tpm_trace_cmd() returns so the above condition should still work as
expected.

> Jason

/Jarkko

\
 
 \ /
  Last update: 2016-03-31 09:01    [W:0.212 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site