All of lore.kernel.org
 help / color / mirror / Atom feed
From: no-reply@patchew.org
To: bd.aviv@gmail.com
Cc: famz@redhat.com, qemu-devel@nongnu.org, jan.kiszka@siemens.com,
	alex.williamson@redhat.com, peterx@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 0/3] IOMMU: intel_iommu support map and unmap notifications
Date: Sat, 15 Oct 2016 03:28:44 -0700 (PDT)	[thread overview]
Message-ID: <20161015102835.502017.65459@ex-std-node742.prod.rhcloud.com> (raw)
In-Reply-To: <1476526326-32363-1-git-send-email-bd.aviv@gmail.com>

Hi,

Your series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 1476526326-32363-1-git-send-email-bd.aviv@gmail.com
Subject: [Qemu-devel] [PATCH v4 0/3] IOMMU: intel_iommu support map and unmap notifications

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
2bf1af5 IOMMU: enable intel_iommu map and unmap notifiers
859d070 IOMMU: change iommu_op->translate's is_write to flags, add support to NO_FAIL flag mode
45f4bb2 IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest

=== OUTPUT BEGIN ===
Checking PATCH 1/3: IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest...
ERROR: space required before the open brace '{'
#31: FILE: hw/i386/intel_iommu.c:2389:
+    if (s->cache_mode_enabled){

total: 1 errors, 0 warnings, 32 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 2/3: IOMMU: change iommu_op->translate's is_write to flags, add support to NO_FAIL flag mode...
WARNING: line over 80 characters
#22: FILE: exec.c:435:
+        iotlb = mr->iommu_ops->translate(mr, addr, is_write ? IOMMU_WO : IOMMU_RO);

WARNING: line over 80 characters
#102: FILE: hw/i386/intel_iommu.c:632:
+static int vtd_gpa_to_slpte(VTDContextEntry *ce, uint64_t gpa, IOMMUAccessFlags flags,

ERROR: switch and case should be at the same indent
#111: FILE: hw/i386/intel_iommu.c:652:
+    switch(flags){
+        case IOMMU_WO:
[...]
+        case IOMMU_RO:
[...]
+        case IOMMU_RW: /* passthrow */
+        case IOMMU_NO_FAIL:
[...]
+        default:

ERROR: space required before the open brace '{'
#111: FILE: hw/i386/intel_iommu.c:652:
+    switch(flags){

ERROR: space required before the open parenthesis '('
#111: FILE: hw/i386/intel_iommu.c:652:
+    switch(flags){

ERROR: line over 90 characters
#135: FILE: hw/i386/intel_iommu.c:688:
+            return (flags == IOMMU_RW || flags == IOMMU_WO) ? -VTD_FR_WRITE : -VTD_FR_READ;

WARNING: line over 80 characters
#149: FILE: hw/i386/intel_iommu.c:809:
+                                   uint8_t devfn, hwaddr addr, IOMMUAccessFlags flags,

ERROR: space required before the open brace '{'
#177: FILE: hw/i386/intel_iommu.c:872:
+            if (flags != IOMMU_NO_FAIL){

ERROR: space required before the open brace '{'
#201: FILE: hw/i386/intel_iommu.c:896:
+        if (flags != IOMMU_NO_FAIL){

WARNING: line over 80 characters
#203: FILE: hw/i386/intel_iommu.c:898:
+                VTD_DPRINTF(FLOG, "fault processing is disabled for DMA requests "

WARNING: line over 80 characters
#251: FILE: include/exec/memory.h:174:
+    IOMMUTLBEntry (*translate)(MemoryRegion *iommu, hwaddr addr, IOMMUAccessFlags flags);

WARNING: line over 80 characters
#264: FILE: memory.c:1566:
+        iotlb = mr->iommu_ops->translate(mr, addr, is_write ? IOMMU_WO : IOMMU_RO);

total: 6 errors, 6 warnings, 214 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 3/3: IOMMU: enable intel_iommu map and unmap notifiers...
ERROR: trailing whitespace
#33: FILE: hw/i386/intel_iommu.c:148:
+static int vtd_get_did_dev(IntelIOMMUState *s, uint8_t bus_num, uint8_t devfn, $

ERROR: "foo * bar" should be "foo *bar"
#34: FILE: hw/i386/intel_iommu.c:149:
+                           uint16_t * domain_id)

ERROR: space required before the open brace '{'
#42: FILE: hw/i386/intel_iommu.c:157:
+    if (ret_fr){

ERROR: trailing whitespace
#77: FILE: hw/i386/intel_iommu.c:1079:
+static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s, $

ERROR: trailing whitespace
#78: FILE: hw/i386/intel_iommu.c:1080:
+                                           uint16_t domain_id, hwaddr addr, $

ERROR: "foo * bar" should be "foo *bar"
#81: FILE: hw/i386/intel_iommu.c:1083:
+    IntelIOMMUNotifierNode * node;

ERROR: space required before the open brace '{'
#83: FILE: hw/i386/intel_iommu.c:1085:
+    QLIST_FOREACH(node, &(s->notifiers_list), next){

ERROR: trailing whitespace
#84: FILE: hw/i386/intel_iommu.c:1086:
+        VTDAddressSpace *vtd_as = node->vtd_as; $

ERROR: trailing whitespace
#85: FILE: hw/i386/intel_iommu.c:1087:
+        uint16_t vfio_domain_id; $

ERROR: trailing whitespace
#86: FILE: hw/i386/intel_iommu.c:1088:
+        int ret = vtd_get_did_dev(s, pci_bus_num(vtd_as->bus), vtd_as->devfn, $

ERROR: do not use C99 // comments
#88: FILE: hw/i386/intel_iommu.c:1090:
+        //int i=0;

ERROR: space required before the open brace '{'
#89: FILE: hw/i386/intel_iommu.c:1091:
+        if (!ret && domain_id == vfio_domain_id){

ERROR: trailing whitespace
#90: FILE: hw/i386/intel_iommu.c:1092:
+            IOMMUTLBEntry entry; $

ERROR: trailing whitespace
#91: FILE: hw/i386/intel_iommu.c:1093:
+            $

ERROR: space required before the open brace '{'
#93: FILE: hw/i386/intel_iommu.c:1095:
+            if (node->notifier_flag & IOMMU_NOTIFIER_UNMAP){

WARNING: line over 80 characters
#94: FILE: hw/i386/intel_iommu.c:1096:
+                VTD_DPRINTF(GENERAL, "Remove addr 0x%"PRIx64 " mask %d", addr, am);

ERROR: trailing whitespace
#102: FILE: hw/i386/intel_iommu.c:1104:
+       $

ERROR: space required before the open brace '{'
#104: FILE: hw/i386/intel_iommu.c:1106:
+            if (node->notifier_flag & IOMMU_NOTIFIER_MAP){

ERROR: spaces required around that '<<' (ctx:VxV)
#107: FILE: hw/i386/intel_iommu.c:1109:
+                while (addr < original_addr + (1<<am) * VTD_PAGE_SIZE){
                                                 ^

ERROR: space required before the open brace '{'
#107: FILE: hw/i386/intel_iommu.c:1109:
+                while (addr < original_addr + (1<<am) * VTD_PAGE_SIZE){

WARNING: line over 80 characters
#110: FILE: hw/i386/intel_iommu.c:1112:
+                                                            &node->vtd_as->iommu,

ERROR: trailing whitespace
#111: FILE: hw/i386/intel_iommu.c:1113:
+                                                            addr, $

ERROR: trailing whitespace
#112: FILE: hw/i386/intel_iommu.c:1114:
+                                                            IOMMU_NO_FAIL); $

ERROR: space required before the open brace '{'
#113: FILE: hw/i386/intel_iommu.c:1115:
+                    if (entry.perm != IOMMU_NONE){

ERROR: trailing whitespace
#114: FILE: hw/i386/intel_iommu.c:1116:
+                        addr += entry.addr_mask + 1; $

ERROR: "foo * bar" should be "foo *bar"
#143: FILE: hw/i386/intel_iommu.c:2066:
+    IntelIOMMUNotifierNode * node = NULL;

ERROR: space required before the open brace '{'
#156: FILE: hw/i386/intel_iommu.c:2078:
+    if (old == IOMMU_NOTIFIER_NONE){

ERROR: space required before the open brace '{'
#165: FILE: hw/i386/intel_iommu.c:2087:
+    QLIST_FOREACH(node, &s->notifiers_list, next){

ERROR: space required before the open brace '{'
#166: FILE: hw/i386/intel_iommu.c:2088:
+        if (node->vtd_as == vtd_as){

ERROR: space required before the open brace '{'
#167: FILE: hw/i386/intel_iommu.c:2089:
+            if (new == IOMMU_NOTIFIER_NONE){

ERROR: trailing whitespace
#199: FILE: include/hw/i386/intel_iommu.h:66:
+typedef struct IntelIOMMUNotifierNode IntelIOMMUNotifierNode; $

ERROR: "foo * bar" should be "foo *bar"
#208: FILE: include/hw/i386/intel_iommu.h:253:
+    VTDAddressSpace * vtd_as;

ERROR: line over 90 characters
#220: FILE: include/hw/i386/intel_iommu.h:295:
+    QLIST_HEAD(, IntelIOMMUNotifierNode) notifiers_list; /* list of registered notifiers */

total: 31 errors, 2 warnings, 185 lines checked

Your patch 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


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

      parent reply	other threads:[~2016-10-15 10:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-15 10:12 [Qemu-devel] [PATCH v4 0/3] IOMMU: intel_iommu support map and unmap notifications Aviv B.D
2016-10-15 10:12 ` [Qemu-devel] [PATCH v4 1/3] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest Aviv B.D
2016-10-15 10:12 ` [Qemu-devel] [PATCH v4 2/3] IOMMU: change iommu_op->translate's is_write to flags, add support to NO_FAIL flag mode Aviv B.D
2016-10-15 10:12 ` [Qemu-devel] [PATCH v4 3/3] IOMMU: enable intel_iommu map and unmap notifiers Aviv B.D
2016-10-15 10:28 ` no-reply [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161015102835.502017.65459@ex-std-node742.prod.rhcloud.com \
    --to=no-reply@patchew.org \
    --cc=alex.williamson@redhat.com \
    --cc=bd.aviv@gmail.com \
    --cc=famz@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=mst@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.