* [PATCH v1] tpm/tpm_ftpm_tee: Use UUID API for exporting the UUID
@ 2020-04-22 13:01 Andy Shevchenko
2020-04-22 15:07 ` Jarkko Sakkinen
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2020-04-22 13:01 UTC (permalink / raw)
To: Peter Huewe, Jarkko Sakkinen, Jason Gunthorpe, linux-integrity
Cc: Andy Shevchenko
There is export_uuid() function which exports uuid_t to the u8 array.
Use it instead of open coding variant.
This allows to hide the uuid_t internals.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/char/tpm/tpm_ftpm_tee.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm_ftpm_tee.c b/drivers/char/tpm/tpm_ftpm_tee.c
index 22bf553ccf9df..2491a2cb54a22 100644
--- a/drivers/char/tpm/tpm_ftpm_tee.c
+++ b/drivers/char/tpm/tpm_ftpm_tee.c
@@ -241,7 +241,7 @@ static int ftpm_tee_probe(struct platform_device *pdev)
/* Open a session with fTPM TA */
memset(&sess_arg, 0, sizeof(sess_arg));
- memcpy(sess_arg.uuid, ftpm_ta_uuid.b, TEE_IOCTL_UUID_LEN);
+ export_uuid(sess_arg.uuid, &ftpm_ta_uuid);
sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC;
sess_arg.num_params = 0;
--
2.26.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] tpm/tpm_ftpm_tee: Use UUID API for exporting the UUID
2020-04-22 13:01 [PATCH v1] tpm/tpm_ftpm_tee: Use UUID API for exporting the UUID Andy Shevchenko
@ 2020-04-22 15:07 ` Jarkko Sakkinen
2020-04-22 15:51 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Sakkinen @ 2020-04-22 15:07 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Peter Huewe, Jason Gunthorpe, linux-integrity
On Wed, Apr 22, 2020 at 04:01:35PM +0300, Andy Shevchenko wrote:
> There is export_uuid() function which exports uuid_t to the u8 array.
> Use it instead of open coding variant.
>
> This allows to hide the uuid_t internals.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
I guess no need for backports?
/Jarkko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] tpm/tpm_ftpm_tee: Use UUID API for exporting the UUID
2020-04-22 15:07 ` Jarkko Sakkinen
@ 2020-04-22 15:51 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2020-04-22 15:51 UTC (permalink / raw)
To: Jarkko Sakkinen; +Cc: Peter Huewe, Jason Gunthorpe, linux-integrity
On Wed, Apr 22, 2020 at 06:07:42PM +0300, Jarkko Sakkinen wrote:
> On Wed, Apr 22, 2020 at 04:01:35PM +0300, Andy Shevchenko wrote:
> > There is export_uuid() function which exports uuid_t to the u8 array.
> > Use it instead of open coding variant.
> >
> > This allows to hide the uuid_t internals.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Acked-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Thanks!
> I guess no need for backports?
No, the API appears in v5.7-rc1.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-22 15:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 13:01 [PATCH v1] tpm/tpm_ftpm_tee: Use UUID API for exporting the UUID Andy Shevchenko
2020-04-22 15:07 ` Jarkko Sakkinen
2020-04-22 15:51 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).