* [PATCH v2 1/6] vhost-user-gpu: fix incorrect print type
@ 2020-10-20 2:23 Zhengui li
2020-10-20 2:24 ` [PATCH v2 2/6] vhost-user-scsi: " Zhengui li
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Zhengui li @ 2020-10-20 2: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>
---
contrib/vhost-user-gpu/vhost-user-gpu.c | 34 ++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
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) {
--
2.6.4.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/6] vhost-user-scsi: fix incorrect print type
2020-10-20 2:23 [PATCH v2 1/6] vhost-user-gpu: fix incorrect print type Zhengui li
@ 2020-10-20 2:24 ` Zhengui li
2020-10-20 2:24 ` [PATCH v2 3/6] vhost-user: " Zhengui li
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Zhengui li @ 2020-10-20 2:24 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>
---
contrib/vhost-user-scsi/vhost-user-scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi/vhost-user-scsi.c
index 3c91238..1527ffd 100644
--- a/contrib/vhost-user-scsi/vhost-user-scsi.c
+++ b/contrib/vhost-user-scsi/vhost-user-scsi.c
@@ -182,7 +182,7 @@ static int handle_cmd_sync(struct iscsi_context *ctx,
task->iovector_in.niov = in_len;
}
- g_debug("Sending iscsi cmd (cdb_len=%d, dir=%d, task=%p)",
+ g_debug("Sending iscsi cmd (cdb_len=%d, dir=%u, task=%p)",
cdb_len, dir, task);
if (!iscsi_scsi_command_sync(ctx, 0, task, NULL)) {
g_warning("Error serving SCSI command");
--
2.6.4.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/6] vhost-user: fix incorrect print type
2020-10-20 2:23 [PATCH v2 1/6] vhost-user-gpu: fix incorrect print type Zhengui li
2020-10-20 2:24 ` [PATCH v2 2/6] vhost-user-scsi: " Zhengui li
@ 2020-10-20 2:24 ` Zhengui li
2020-10-20 2:24 ` [PATCH v2 4/6] virtio-gpu: " Zhengui li
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Zhengui li @ 2020-10-20 2:24 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/virtio/vhost-user.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 9c5b4f7..db563bd 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -308,7 +308,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
/* validate message size is sane */
if (msg->hdr.size > VHOST_USER_PAYLOAD_SIZE) {
error_report("Failed to read msg header."
- " Size %d exceeds the maximum %zu.", msg->hdr.size,
+ " Size %u exceeds the maximum %zu.", msg->hdr.size,
VHOST_USER_PAYLOAD_SIZE);
return -1;
}
@@ -319,7 +319,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
r = qemu_chr_fe_read_all(chr, p, size);
if (r != size) {
error_report("Failed to read msg payload."
- " Read %d instead of %d.", r, msg->hdr.size);
+ " Read %d instead of %u.", r, msg->hdr.size);
return -1;
}
}
@@ -740,7 +740,7 @@ static int send_add_regions(struct vhost_dev *dev,
*/
if (msg_reply.hdr.size != msg->hdr.size) {
error_report("%s: Unexpected size for postcopy reply "
- "%d vs %d", __func__, msg_reply.hdr.size,
+ "%u vs %u", __func__, msg_reply.hdr.size,
msg->hdr.size);
return -1;
}
@@ -905,7 +905,7 @@ static int vhost_user_set_mem_table_postcopy(struct vhost_dev *dev,
*/
if (msg_reply.hdr.size != msg.hdr.size) {
error_report("%s: Unexpected size for postcopy reply "
- "%d vs %d", __func__, msg_reply.hdr.size,
+ "%u vs %u", __func__, msg_reply.hdr.size,
msg.hdr.size);
return -1;
}
@@ -1445,7 +1445,7 @@ static void slave_read(void *opaque)
if (hdr.size > VHOST_USER_PAYLOAD_SIZE) {
error_report("Failed to read msg header."
- " Size %d exceeds the maximum %zu.", hdr.size,
+ " Size %u exceeds the maximum %zu.", hdr.size,
VHOST_USER_PAYLOAD_SIZE);
goto err;
}
--
2.6.4.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 4/6] virtio-gpu: fix incorrect print type
2020-10-20 2:23 [PATCH v2 1/6] vhost-user-gpu: fix incorrect print type Zhengui li
2020-10-20 2:24 ` [PATCH v2 2/6] vhost-user-scsi: " Zhengui li
2020-10-20 2:24 ` [PATCH v2 3/6] vhost-user: " Zhengui li
@ 2020-10-20 2:24 ` Zhengui li
2020-10-20 2:24 ` [PATCH v2 5/6] virtio-iommu: " Zhengui li
2020-10-20 2:24 ` [PATCH v2 6/6] vfio: " Zhengui li
4 siblings, 0 replies; 6+ messages in thread
From: Zhengui li @ 2020-10-20 2:24 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;
--
2.6.4.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 5/6] virtio-iommu: fix incorrect print type
2020-10-20 2:23 [PATCH v2 1/6] vhost-user-gpu: fix incorrect print type Zhengui li
` (2 preceding siblings ...)
2020-10-20 2:24 ` [PATCH v2 4/6] virtio-gpu: " Zhengui li
@ 2020-10-20 2:24 ` Zhengui li
2020-10-20 2:24 ` [PATCH v2 6/6] vfio: " Zhengui li
4 siblings, 0 replies; 6+ messages in thread
From: Zhengui li @ 2020-10-20 2:24 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/virtio/virtio-iommu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
index 21ec63b..bd6ce44 100644
--- a/hw/virtio/virtio-iommu.c
+++ b/hw/virtio/virtio-iommu.c
@@ -632,7 +632,7 @@ static IOMMUTLBEntry virtio_iommu_translate(IOMMUMemoryRegion *mr, hwaddr addr,
ep = g_tree_lookup(s->endpoints, GUINT_TO_POINTER(sid));
if (!ep) {
if (!bypass_allowed) {
- error_report_once("%s sid=%d is not known!!", __func__, sid);
+ error_report_once("%s sid=%u is not known!!", __func__, sid);
virtio_iommu_report_fault(s, VIRTIO_IOMMU_FAULT_R_UNKNOWN,
VIRTIO_IOMMU_FAULT_F_ADDRESS,
sid, addr);
@@ -679,7 +679,7 @@ static IOMMUTLBEntry virtio_iommu_translate(IOMMUMemoryRegion *mr, hwaddr addr,
(void **)&mapping_key,
(void **)&mapping_value);
if (!found) {
- error_report_once("%s no mapping for 0x%"PRIx64" for sid=%d",
+ error_report_once("%s no mapping for 0x%"PRIx64" for sid=%u",
__func__, addr, sid);
virtio_iommu_report_fault(s, VIRTIO_IOMMU_FAULT_R_MAPPING,
VIRTIO_IOMMU_FAULT_F_ADDRESS,
@@ -695,7 +695,7 @@ static IOMMUTLBEntry virtio_iommu_translate(IOMMUMemoryRegion *mr, hwaddr addr,
flags = read_fault ? VIRTIO_IOMMU_FAULT_F_READ : 0;
flags |= write_fault ? VIRTIO_IOMMU_FAULT_F_WRITE : 0;
if (flags) {
- error_report_once("%s permission error on 0x%"PRIx64"(%d): allowed=%d",
+ error_report_once("%s permission error on 0x%"PRIx64"(%d): allowed=%u",
__func__, addr, flag, mapping_value->flags);
flags |= VIRTIO_IOMMU_FAULT_F_ADDRESS;
virtio_iommu_report_fault(s, VIRTIO_IOMMU_FAULT_R_MAPPING,
--
2.6.4.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 6/6] vfio: fix incorrect print type
2020-10-20 2:23 [PATCH v2 1/6] vhost-user-gpu: fix incorrect print type Zhengui li
` (3 preceding siblings ...)
2020-10-20 2:24 ` [PATCH v2 5/6] virtio-iommu: " Zhengui li
@ 2020-10-20 2:24 ` Zhengui li
4 siblings, 0 replies; 6+ messages in thread
From: Zhengui li @ 2020-10-20 2:24 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/vfio/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 13471ae..acc3356 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -203,7 +203,7 @@ void vfio_region_write(void *opaque, hwaddr addr,
buf.qword = cpu_to_le64(data);
break;
default:
- hw_error("vfio: unsupported write size, %d bytes", size);
+ hw_error("vfio: unsupported write size, %u bytes", size);
break;
}
@@ -260,7 +260,7 @@ uint64_t vfio_region_read(void *opaque,
data = le64_to_cpu(buf.qword);
break;
default:
- hw_error("vfio: unsupported read size, %d bytes", size);
+ hw_error("vfio: unsupported read size, %u bytes", size);
break;
}
--
2.6.4.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-20 2:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-20 2:23 [PATCH v2 1/6] vhost-user-gpu: fix incorrect print type Zhengui li
2020-10-20 2:24 ` [PATCH v2 2/6] vhost-user-scsi: " Zhengui li
2020-10-20 2:24 ` [PATCH v2 3/6] vhost-user: " Zhengui li
2020-10-20 2:24 ` [PATCH v2 4/6] virtio-gpu: " Zhengui li
2020-10-20 2:24 ` [PATCH v2 5/6] virtio-iommu: " Zhengui li
2020-10-20 2:24 ` [PATCH v2 6/6] vfio: " Zhengui li
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).