diff mbox series

vhost-user-gpu: incorrect print type

Message ID 1603114196-22776-1-git-send-email-lizhengui@huawei.com (mailing list archive)
State New, archived
Headers show
Series vhost-user-gpu: incorrect print type | expand

Commit Message

Zhengui li Oct. 19, 2020, 1:29 p.m. UTC
fix incorrect print type.
---
 contrib/vhost-user-gpu/vhost-user-gpu.c | 34 ++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

Comments

no-reply@patchew.org Oct. 19, 2020, 1:36 p.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/1603114196-22776-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: 1603114196-22776-1-git-send-email-lizhengui@huawei.com
Subject: [PATCH] vhost-user-gpu: 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
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/1603114196-22776-1-git-send-email-lizhengui@huawei.com -> patchew/1603114196-22776-1-git-send-email-lizhengui@huawei.com
 - [tag update]      patchew/20200928160402.7961-1-peter.maydell@linaro.org -> patchew/20200928160402.7961-1-peter.maydell@linaro.org
Switched to a new branch 'test'
9b2dfcb vhost-user-gpu: incorrect print type

=== OUTPUT BEGIN ===
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 130 lines checked

Commit 9b2dfcb979e6 (vhost-user-gpu: 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/1603114196-22776-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
diff mbox series

Patch

diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-gpu/vhost-user-gpu.c
index a019d0a..ee2bf59 100644
--- a/contrib/vhost-user-gpu/vhost-user-gpu.c
+++ b/contrib/vhost-user-gpu/vhost-user-gpu.c
@@ -299,7 +299,7 @@  vg_resource_create_2d(VuGpu *g,
 
     res = virtio_gpu_find_resource(g, c2d.resource_id);
     if (res) {
-        g_critical("%s: resource already exists %d", __func__, c2d.resource_id);
+        g_critical("%s: resource already exists %u", __func__, c2d.resource_id);
         cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
         return;
     }
@@ -312,7 +312,7 @@  vg_resource_create_2d(VuGpu *g,
 
     pformat = virtio_gpu_get_pixman_format(c2d.format);
     if (!pformat) {
-        g_critical("%s: host couldn't handle guest format %d",
+        g_critical("%s: host couldn't handle guest format %u",
                    __func__, c2d.format);
         g_free(res);
         cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER;
@@ -325,7 +325,7 @@  vg_resource_create_2d(VuGpu *g,
                                           (uint32_t *)res->buffer.mmap,
                                           res->buffer.stride);
     if (!res->image) {
-        g_critical("%s: resource creation failed %d %d %d",
+        g_critical("%s: resource creation failed %u %u %u",
                    __func__, c2d.resource_id, c2d.width, c2d.height);
         g_free(res);
         cmd->error = VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY;
@@ -395,7 +395,7 @@  vg_resource_unref(VuGpu *g,
 
     res = virtio_gpu_find_resource(g, unref.resource_id);
     if (!res) {
-        g_critical("%s: illegal resource specified %d",
+        g_critical("%s: illegal resource specified %u",
                    __func__, unref.resource_id);
         cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
         return;
@@ -414,7 +414,7 @@  vg_create_mapping_iov(VuGpu *g,
     int i;
 
     if (ab->nr_entries > 16384) {
-        g_critical("%s: nr_entries is too big (%d > 16384)",
+        g_critical("%s: nr_entries is too big (%u > 16384)",
                    __func__, ab->nr_entries);
         return -1;
     }
@@ -436,7 +436,7 @@  vg_create_mapping_iov(VuGpu *g,
         (*iov)[i].iov_len = ents[i].length;
         (*iov)[i].iov_base = vu_gpa_to_va(&g->dev.parent, &len, ents[i].addr);
         if (!(*iov)[i].iov_base || len != ents[i].length) {
-            g_critical("%s: resource %d element %d",
+            g_critical("%s: resource %u element %d",
                        __func__, ab->resource_id, i);
             g_free(*iov);
             g_free(ents);
@@ -461,7 +461,7 @@  vg_resource_attach_backing(VuGpu *g,
 
     res = virtio_gpu_find_resource(g, ab.resource_id);
     if (!res) {
-        g_critical("%s: illegal resource specified %d",
+        g_critical("%s: illegal resource specified %u",
                    __func__, ab.resource_id);
         cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
         return;
@@ -488,7 +488,7 @@  vg_resource_detach_backing(VuGpu *g,
 
     res = virtio_gpu_find_resource(g, detach.resource_id);
     if (!res || !res->iov) {
-        g_critical("%s: illegal resource specified %d",
+        g_critical("%s: illegal resource specified %u",
                    __func__, detach.resource_id);
         cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
         return;
@@ -515,7 +515,7 @@  vg_transfer_to_host_2d(VuGpu *g,
 
     res = virtio_gpu_find_resource(g, t2d.resource_id);
     if (!res || !res->iov) {
-        g_critical("%s: illegal resource specified %d",
+        g_critical("%s: illegal resource specified %u",
                    __func__, t2d.resource_id);
         cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
         return;
@@ -528,7 +528,7 @@  vg_transfer_to_host_2d(VuGpu *g,
         t2d.r.x + t2d.r.width > res->width ||
         t2d.r.y + t2d.r.height > res->height) {
         g_critical("%s: transfer bounds outside resource"
-                   " bounds for resource %d: %d %d %d %d vs %d %d",
+                   " bounds for resource %u: %u %u %u %u vs %u %u",
                    __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;
@@ -571,7 +571,7 @@  vg_set_scanout(VuGpu *g,
     virtio_gpu_bswap_32(&ss, sizeof(ss));
 
     if (ss.scanout_id >= VIRTIO_GPU_MAX_SCANOUTS) {
-        g_critical("%s: illegal scanout id specified %d",
+        g_critical("%s: illegal scanout id specified %u",
                    __func__, ss.scanout_id);
         cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_SCANOUT_ID;
         return;
@@ -585,7 +585,7 @@  vg_set_scanout(VuGpu *g,
     /* create a surface for this scanout */
     res = virtio_gpu_find_resource(g, ss.resource_id);
     if (!res) {
-        g_critical("%s: illegal resource specified %d",
+        g_critical("%s: illegal resource specified %u",
                       __func__, ss.resource_id);
         cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
         return;
@@ -597,8 +597,8 @@  vg_set_scanout(VuGpu *g,
         ss.r.height > res->height ||
         ss.r.x + ss.r.width > res->width ||
         ss.r.y + ss.r.height > res->height) {
-        g_critical("%s: illegal scanout %d bounds for"
-                   " resource %d, (%d,%d)+%d,%d vs %d %d",
+        g_critical("%s: illegal scanout %u bounds for"
+                   " resource %u, (%u,%u)+%u,%u vs %u %u",
                    __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;
@@ -670,7 +670,7 @@  vg_resource_flush(VuGpu *g,
 
     res = virtio_gpu_find_resource(g, rf.resource_id);
     if (!res) {
-        g_critical("%s: illegal resource specified %d\n",
+        g_critical("%s: illegal resource specified %u\n",
                    __func__, rf.resource_id);
         cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_RESOURCE_ID;
         return;
@@ -683,7 +683,7 @@  vg_resource_flush(VuGpu *g,
         rf.r.x + rf.r.width > res->width ||
         rf.r.y + rf.r.height > res->height) {
         g_critical("%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;
@@ -835,7 +835,7 @@  vg_handle_ctrl(VuDev *dev, int qidx)
         }
 
         virtio_gpu_ctrl_hdr_bswap(&cmd->cmd_hdr);
-        g_debug("%d %s\n", cmd->cmd_hdr.type,
+        g_debug("%u %s\n", cmd->cmd_hdr.type,
                 vg_cmd_to_string(cmd->cmd_hdr.type));
 
         if (vg->virgl) {