On Fri, Nov 16, 2018 at 09:51:13AM -0800, Tadeusz Struk wrote:
> The file_priv->data_pending name is not adequate as it
> doesn't contain any data, but the result from the last
> successful call to tpm_transmit() function, so rename it
> to transmit_result. Also its type should be size_t instead
> of ssize_t as it will never be negative. Change it as well.
> 
> Signed-off-by: Tadeusz Struk <tadeusz.st...@intel.com>
> ---
>  drivers/char/tpm/tpm-dev-common.c |   20 ++++++++++----------
>  drivers/char/tpm/tpm-dev.h        |    4 ++--
>  2 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/char/tpm/tpm-dev-common.c 
> b/drivers/char/tpm/tpm-dev-common.c
> index 99b5133a9d05..67a70e2fde7f 100644
> --- a/drivers/char/tpm/tpm-dev-common.c
> +++ b/drivers/char/tpm/tpm-dev-common.c
> @@ -40,7 +40,7 @@ static void tpm_async_work(struct work_struct *work)
>  
>       tpm_put_ops(priv->chip);
>       if (ret > 0) {
> -             priv->data_pending = ret;
> +             priv->transmit_result = ret;

I don't know if you saw my later response before sending this but
since you made the remark that it does not carry the error code
more proper name is response_length because that is exactly the
data it contains.

/Jarkko

Reply via email to