tee: optee: Use UUID API for exporting the UUID
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 22 Apr 2020 13:00:47 +0000 (16:00 +0300)
committerJens Wiklander <jens.wiklander@linaro.org>
Tue, 13 Oct 2020 06:03:18 +0000 (08:03 +0200)
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.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/optee/device.c

index 7a897d51969fc8c54298b31af4fe068dc7c300e0..ec1d24693ebaae10d89874fc67ead117e961daa8 100644 (file)
@@ -98,7 +98,7 @@ static int __optee_enumerate_devices(u32 func)
                return -ENODEV;
 
        /* Open session with device enumeration pseudo TA */
-       memcpy(sess_arg.uuid, pta_uuid.b, TEE_IOCTL_UUID_LEN);
+       export_uuid(sess_arg.uuid, &pta_uuid);
        sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC;
        sess_arg.num_params = 0;