virtio-gpu: fix incorrect print type
PATCH 1/1 virtio-gpu: fix incorrect print type
The type of input variable is unsigned int
while the printer type is int. So fix incorrect print type.
--- hw/display/virtio-gpu.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
hw/display/virtio-gpu.c +16 -16
@@ -275,7 +275,7 @@ static void virtio_gpu_resource_create_2d(VirtIOGPU *g, res =virtio_gpu_find_resource (g, c2d.resource_id);if (res) { -qemu_log_mask (LOG_GUEST_ERROR ,"%s: resource already exists %d\n" , +qemu_log_mask (LOG_GUEST_ERROR ,"%s: resource already exists %u\n" , __func__, c2d.resource_id); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID ;return ;
@@ -291,7 +291,7 @@ static void virtio_gpu_resource_create_2d(VirtIOGPU *g, pformat =virtio_gpu_get_pixman_format (c2d.format);if (!pformat) {qemu_log_mask (LOG_GUEST_ERROR , -"%s: host couldn't handle guest format %d\n" , +"%s: host couldn't handle guest format %u\n" , __func__, c2d.format);g_free (res); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER ;
@@ -308,7 +308,7 @@ static void virtio_gpu_resource_create_2d(VirtIOGPU *g,if (!res->image) {qemu_log_mask (LOG_GUEST_ERROR , -"%s: resource creation failed %d %d %d\n" , +"%s: resource creation failed %u %u %u\n" , __func__, c2d.resource_id, c2d.width, c2d.height);g_free (res); cmd->error =VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY ;
@@ -379,7 +379,7 @@ static void virtio_gpu_resource_unref(VirtIOGPU *g, res =virtio_gpu_find_resource (g, unref.resource_id);if (!res) { -qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %d\n" , +qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %u\n" , __func__, unref.resource_id); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID ;return ;
@@ -403,7 +403,7 @@ static void virtio_gpu_transfer_to_host_2d(VirtIOGPU *g, res =virtio_gpu_find_resource (g, t2d.resource_id);if (!res || !res->iov) { -qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %d\n" , +qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %u\n" , __func__, t2d.resource_id); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID ;return ;
@@ -416,7 +416,7 @@ static void virtio_gpu_transfer_to_host_2d(VirtIOGPU *g, t2d.r.x + t2d.r.width > res->width || t2d.r.y + t2d.r.height > res->height) {qemu_log_mask (LOG_GUEST_ERROR ,"%s: transfer bounds outside resource" -" bounds for resource %d: %d %d %d %d vs %d %d\n" , +" bounds for resource %u: %u %u %u %u vs %u %u\n" , __func__, t2d.resource_id, t2d.r.x, t2d.r.y, t2d.r.width, t2d.r.height, res->width, res->height); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER ;
@@ -461,7 +461,7 @@ static void virtio_gpu_resource_flush(VirtIOGPU *g, res =virtio_gpu_find_resource (g, rf.resource_id);if (!res) { -qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %d\n" , +qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %u\n" , __func__, rf.resource_id); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID ;return ;
@@ -474,7 +474,7 @@ static void virtio_gpu_resource_flush(VirtIOGPU *g, rf.r.x + rf.r.width > res->width || rf.r.y + rf.r.height > res->height) {qemu_log_mask (LOG_GUEST_ERROR ,"%s: flush bounds outside resource" -" bounds for resource %d: %d %d %d %d vs %d %d\n" , +" bounds for resource %u: %u %u %u %u vs %u %u\n" , __func__, rf.resource_id, rf.r.x, rf.r.y, rf.r.width, rf.r.height, res->width, res->height); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER ;
@@ -533,7 +533,7 @@ static void virtio_gpu_set_scanout(VirtIOGPU *g, ss.r.width, ss.r.height, ss.r.x, ss.r.y);if (ss.scanout_id >= g->parent_obj.conf.max_outputs) { -qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal scanout id specified %d" , +qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal scanout id specified %u" , __func__, ss.scanout_id); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_SCANOUT_ID ;return ;
@@ -548,7 +548,7 @@ static void virtio_gpu_set_scanout(VirtIOGPU *g,/* create a surface for this scanout */ res =virtio_gpu_find_resource (g, ss.resource_id);if (!res) { -qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %d\n" , +qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %u\n" , __func__, ss.resource_id); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID ;return ;
@@ -562,8 +562,8 @@ static void virtio_gpu_set_scanout(VirtIOGPU *g, ss.r.height > res->height || ss.r.x + ss.r.width > res->width || ss.r.y + ss.r.height > res->height) { -qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal scanout %d bounds for" -" resource %d, (%d,%d)+%d,%d vs %d %d\n" , +qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal scanout %u bounds for" +" resource %u, (%u,%u)+%u,%u vs %u %u\n" , __func__, ss.scanout_id, ss.resource_id, ss.r.x, ss.r.y, ss.r.width, ss.r.height, res->width, res->height); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER ;
@@ -621,7 +621,7 @@ int virtio_gpu_create_mapping_iov(VirtIOGPU *g,if (ab->nr_entries >16384 ) {qemu_log_mask (LOG_GUEST_ERROR , -"%s: nr_entries is too big (%d > 16384)\n" , +"%s: nr_entries is too big (%u > 16384)\n" , __func__, ab->nr_entries);return -1 ; }
@@ -654,7 +654,7 @@ int virtio_gpu_create_mapping_iov(VirtIOGPU *g, }if (!(*iov)[i].iov_base || len != l) {qemu_log_mask (LOG_GUEST_ERROR ,"%s: failed to map MMIO memory for" -" resource %d element %d\n" , +" resource %u element %d\n" , __func__, ab->resource_id, i);if ((*iov)[i].iov_base) { i++;/* cleanup the 'i'th map */
@@ -711,7 +711,7 @@ virtio_gpu_resource_attach_backing(VirtIOGPU *g, res =virtio_gpu_find_resource (g, ab.resource_id);if (!res) { -qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %d\n" , +qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %u\n" , __func__, ab.resource_id); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID ;return ;
@@ -744,7 +744,7 @@ virtio_gpu_resource_detach_backing(VirtIOGPU *g, res =virtio_gpu_find_resource (g, detach.resource_id);if (!res || !res->iov) { -qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %d\n" , +qemu_log_mask (LOG_GUEST_ERROR ,"%s: illegal resource specified %u\n" , __func__, detach.resource_id); cmd->error =VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID ;return ;
Signature · 1 line
1.8.3.1
Quoted 7 lines · Zhengui li
The type of input variable is unsigned int
while the printer type is int. So fix incorrect print type.Signed-off-by Zhengui li <[email protected]>--- hw/display/virtio-gpu.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
This looks like an updated version of an earlier patch. If so, please remember to send with -v2 in the subject line and a summary of the differences after the --- comment (even if the differences are just an enhanced commit message), to save on reviewer's time.
As an example, 'git send-email -v2 -5' can send a series of 5 patches all with -v2 in the subject line, and include a 0/5 cover letter if you have git configured correctly.
More patch submission hints at:
https://wiki.qemu.org/Contribute/SubmitAPatch
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org