tpm/tpm_ftpm_tee: Use UUID API for exporting the UUID
Subsystems (2)
PATCH 1/1 tpm/tpm_ftpm_tee: Use UUID API for exporting the UUID
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 <[email protected]>
--- drivers/char/tpm/tpm_ftpm_tee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm_ftpm_tee.c +1 -1
@@ -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 ;
Signature · 1 line
2.26.1
Quoted 6 lines · Andy Shevchenko
There is
export_uuid()function which exportsuuid_tto the u8 array. Use it instead of open coding variant.This allows to hide the
uuid_tinternals.Signed-off-by Andy Shevchenko <[email protected]>
Acked-by Jarkko Sakkinen <[email protected]>
I guess no need for backports?
/Jarkko
Quoted 9 lines · Jarkko Sakkinen
Quoted 6 lines · Andy Shevchenko
There is
export_uuid()function which exportsuuid_tto the u8 array. Use it instead of open coding variant.This allows to hide the
uuid_tinternals.Signed-off-by Andy Shevchenko <[email protected]>Acked-by Jarkko Sakkinen <[email protected]>
Thanks!
Quoted 1 line
I guess no need for backports?
No, the API appears in v5.7-rc1.
Signature · 2 lines
With Best Regards, Andy Shevchenko