OSDN Git Service

drm/virtio: Use UUID API for importing the UUID
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 13 Oct 2020 13:27:14 +0000 (16:27 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 14 Oct 2020 07:30:19 +0000 (09:30 +0200)
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 <stevensd@chromium.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20201013132714.70973-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_vq.c

index 6434b9f..c1824f5 100644 (file)
@@ -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;