drm/virtio: Use UUID API for importing the UUID
Subsystems (4)
PATCH v2 1/1 drm/virtio: Use UUID API for importing the UUID
There is import_uuid() function which imports u8 array to the uuid_t. Use it instead of open coding variant.
This allows to hide the uuid_t internals.
Reviewed-by David Stevens <[email protected]>
Signed-off-by Andy Shevchenko <[email protected]>
---
v2: rebased on top of drm-misc-next (Gerd), added Rb tag (David)
drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/virtio/virtgpu_vq.c +1 -1
@@ -1141,7 +1141,7 @@ static void virtio_gpu_cmd_resource_uuid_cb(struct virtio_gpu_device *vgdev,if (resp_type ==VIRTIO_GPU_RESP_OK_RESOURCE_UUID && obj->uuid_state ==STATE_INITIALIZING ) { -memcpy (&obj->uuid.b, resp->uuid,sizeof (obj->uuid.b)); +import_uuid (&obj->uuid, resp->uuid); obj->uuid_state =STATE_OK ; }else { obj->uuid_state =STATE_ERR ;
Signature · 6 lines
2.28.0 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Quoted 7 lines · Andy Shevchenko
There is
import_uuid()function which imports u8 array to theuuid_t. Use it instead of open coding variant.This allows to hide the
uuid_tinternals.Reviewed-by David Stevens <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
Pushed to drm-misc-next.
thanks,
Gerd
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel