* [PATCH] virtio-gpu: fix incorrect print type
@ 2020-10-19 13:31 Zhengui li
2020-10-19 13:40 ` no-reply
0 siblings, 1 reply; 4+ messages in thread
From: Zhengui li @ 2020-10-19 13:31 UTC (permalink / raw)
To: pbonzini, stefanha, mreitz, kwolf
Cc: xieyingtai, lizhengui, qemu-devel, qemu-block
fix incorrect print type.
---
hw/display/virtio-gpu.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 90be4e3..d785d88 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] virtio-gpu: fix incorrect print type
2020-10-19 13:31 [PATCH] virtio-gpu: fix incorrect print type Zhengui li
@ 2020-10-19 13:40 ` no-reply
0 siblings, 0 replies; 4+ messages in thread
From: no-reply @ 2020-10-19 13:40 UTC (permalink / raw)
To: lizhengui
Cc: kwolf, xieyingtai, lizhengui, qemu-block, qemu-devel, mreitz,
stefanha, pbonzini
Patchew URL: https://patchew.org/QEMU/1603114292-10332-1-git-send-email-lizhengui@huawei.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Type: series
Message-id: 1603114292-10332-1-git-send-email-lizhengui@huawei.com
Subject: [PATCH] virtio-gpu: fix incorrect print type
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
ddfd443 virtio-gpu: fix incorrect print type
=== OUTPUT BEGIN ===
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 122 lines checked
Commit ddfd4437fd4d (virtio-gpu: fix incorrect print type) has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/1603114292-10332-1-git-send-email-lizhengui@huawei.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] virtio-gpu: fix incorrect print type
2020-10-19 14:23 Zhengui li
@ 2020-10-19 20:39 ` Eric Blake
0 siblings, 0 replies; 4+ messages in thread
From: Eric Blake @ 2020-10-19 20:39 UTC (permalink / raw)
To: Zhengui li, pbonzini, stefanha, mreitz, kwolf
Cc: xieyingtai, qemu-devel, qemu-block
On 10/19/20 9:23 AM, Zhengui li wrote:
> The type of input variable is unsigned int
> while the printer type is int. So fix incorrect print type.
>
> Signed-off-by: Zhengui li <lizhengui@huawei.com>
> ---
> 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
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] virtio-gpu: fix incorrect print type
@ 2020-10-19 14:23 Zhengui li
2020-10-19 20:39 ` Eric Blake
0 siblings, 1 reply; 4+ messages in thread
From: Zhengui li @ 2020-10-19 14:23 UTC (permalink / raw)
To: pbonzini, stefanha, mreitz, kwolf
Cc: xieyingtai, lizhengui, qemu-devel, qemu-block
The type of input variable is unsigned int
while the printer type is int. So fix incorrect print type.
Signed-off-by: Zhengui li <lizhengui@huawei.com>
---
hw/display/virtio-gpu.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 90be4e3..d785d88 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-19 20:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 13:31 [PATCH] virtio-gpu: fix incorrect print type Zhengui li
2020-10-19 13:40 ` no-reply
2020-10-19 14:23 Zhengui li
2020-10-19 20:39 ` Eric Blake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).