Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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>

authored by

Andy Shevchenko and committed by
Gerd Hoffmann
412ae84c 8bca49e4

+1 -1
+1 -1
drivers/gpu/drm/virtio/virtgpu_vq.c
··· 1141 1141 1142 1142 if (resp_type == VIRTIO_GPU_RESP_OK_RESOURCE_UUID && 1143 1143 obj->uuid_state == STATE_INITIALIZING) { 1144 - memcpy(&obj->uuid.b, resp->uuid, sizeof(obj->uuid.b)); 1144 + import_uuid(&obj->uuid, resp->uuid); 1145 1145 obj->uuid_state = STATE_OK; 1146 1146 } else { 1147 1147 obj->uuid_state = STATE_ERR;