[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181118074158.GF5897@linux.intel.com>
Date: Sun, 18 Nov 2018 09:41:58 +0200
From: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To: Tadeusz Struk <tadeusz.struk@...el.com>
Cc: jgg@...pe.ca, linux-integrity@...r.kernel.org,
linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] tpm: rename data_pending to transmit_result
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.struk@...el.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
Powered by blists - more mailing lists