Re: [PATCH v7 3/5] tpm: Clean up reading of timeout and duration capabilities

2016-06-22 Thread Jarkko Sakkinen
On Tue, Jun 21, 2016 at 05:21:27PM -0700, Ed Swierk wrote: > On Mon, Jun 20, 2016 at 6:54 PM, Ed Swierk wrote: > > --- a/drivers/char/tpm/tpm-interface.c > > +++ b/drivers/char/tpm/tpm-interface.c > > @@ -461,9 +461,19 @@ ssize_t tpm_getcap(struct device *dev, __be32 > > subcap_id, cap_t *cap, >

Re: [PATCH v7 3/5] tpm: Clean up reading of timeout and duration capabilities

2016-06-21 Thread Ed Swierk
On Mon, Jun 20, 2016 at 6:54 PM, Ed Swierk wrote: > --- a/drivers/char/tpm/tpm-interface.c > +++ b/drivers/char/tpm/tpm-interface.c > @@ -461,9 +461,19 @@ ssize_t tpm_getcap(struct device *dev, __be32 subcap_id, > cap_t *cap, > tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4)

Re: [PATCH v7 3/5] tpm: Clean up reading of timeout and duration capabilities

2016-06-21 Thread Jarkko Sakkinen
On Mon, Jun 20, 2016 at 06:54:00PM -0700, Ed Swierk wrote: > Call tpm_getcap() from tpm_get_timeouts() to eliminate redundant > code. Return all errors to the caller rather than swallowing them > (e.g. when tpm_transmit_cmd() returns nonzero). > > Signed-off-by: Ed Swierk Reviewed-by: Jarkko Sak

[PATCH v7 3/5] tpm: Clean up reading of timeout and duration capabilities

2016-06-20 Thread Ed Swierk
Call tpm_getcap() from tpm_get_timeouts() to eliminate redundant code. Return all errors to the caller rather than swallowing them (e.g. when tpm_transmit_cmd() returns nonzero). Signed-off-by: Ed Swierk --- drivers/char/tpm/tpm-interface.c | 74 +++- 1 file c