qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio-iommu: fix incorrect print type
@ 2020-10-19 13:31 Zhengui li
  2020-10-19 13:39 ` 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/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,
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtio-iommu: fix incorrect print type
  2020-10-19 13:31 [PATCH] virtio-iommu: fix incorrect print type Zhengui li
@ 2020-10-19 13:39 ` no-reply
  2020-10-19 20:24   ` Eric Blake
  0 siblings, 1 reply; 4+ messages in thread
From: no-reply @ 2020-10-19 13:39 UTC (permalink / raw)
  To: lizhengui
  Cc: kwolf, xieyingtai, lizhengui, qemu-block, qemu-devel, mreitz,
	stefanha, pbonzini

Patchew URL: https://patchew.org/QEMU/1603114311-7392-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: 1603114311-7392-1-git-send-email-lizhengui@huawei.com
Subject: [PATCH] virtio-iommu: 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
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/1603114292-10332-1-git-send-email-lizhengui@huawei.com -> patchew/1603114292-10332-1-git-send-email-lizhengui@huawei.com
 * [new tag]         patchew/1603114311-7392-1-git-send-email-lizhengui@huawei.com -> patchew/1603114311-7392-1-git-send-email-lizhengui@huawei.com
Switched to a new branch 'test'
c61a848 virtio-iommu: fix incorrect print type

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

total: 1 errors, 0 warnings, 24 lines checked

Commit c61a8487f435 (virtio-iommu: 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/1603114311-7392-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-iommu: fix incorrect print type
  2020-10-19 13:39 ` no-reply
@ 2020-10-19 20:24   ` Eric Blake
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Blake @ 2020-10-19 20:24 UTC (permalink / raw)
  To: qemu-devel, lizhengui
  Cc: kwolf, xieyingtai, qemu-block, mreitz, stefanha, pbonzini

On 10/19/20 8:39 AM, no-reply@patchew.org wrote:
> Patchew URL: https://patchew.org/QEMU/1603114311-7392-1-git-send-email-lizhengui@huawei.com/
> 

> c61a848 virtio-iommu: fix incorrect print type
> 
> === OUTPUT BEGIN ===
> ERROR: Missing Signed-off-by: line(s)
> 
> total: 1 errors, 0 warnings, 24 lines checked
> 
> Commit c61a8487f435 (virtio-iommu: 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.

More than just a style problem, a missing S-o-b means we can't apply the 
patch ;)

You may also want to group your related patches under a single thread 
with a 0/N cover letter, rather than sending N threads of one patch each.

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-iommu: fix incorrect print type
@ 2020-10-19 14:23 Zhengui li
  0 siblings, 0 replies; 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/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,
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-19 20:26 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-iommu: fix incorrect print type Zhengui li
2020-10-19 13:39 ` no-reply
2020-10-19 20:24   ` Eric Blake
2020-10-19 14:23 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).