qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PULL 0/6] Block patches


From: no-reply
Subject: Re: [Qemu-block] [Qemu-devel] [PULL 0/6] Block patches
Date: Mon, 5 Mar 2018 01:52:08 -0800 (PST)

Hi,

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

Type: series
Message-id: address@hidden
Subject: [Qemu-devel] [PULL 0/6] Block patches

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

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

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --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
From https://github.com/patchew-project/qemu
   136c67e078..4f51e1d386  master     -> master
 * [new tag]               patchew/address@hidden -> patchew/address@hidden
 * [new tag]               patchew/address@hidden -> patchew/address@hidden
Switched to a new branch 'test'
20eeab9795 README: Document 'git-publish' workflow
333283c56b Add a git-publish configuration file
3a9752c776 tests/libqos: Check for valid dev pointer when looking for PCI 
devices
6863406cb9 util/uri.c: wrap single statement blocks with braces {}
906ebc14e5 util/uri.c: remove brackets that wrap `return` statement's content.
d0e12d0916 util/uri.c: Coding style check, Only whitespace involved

=== OUTPUT BEGIN ===
Checking PATCH 1/6: util/uri.c: Coding style check, Only whitespace involved...
ERROR: return is not a function, parentheses are not required
#171: FILE: util/uri.c:215:
+        return (-1);

ERROR: return is not a function, parentheses are not required
#176: FILE: util/uri.c:219:
+        return (2);

ERROR: return is not a function, parentheses are not required
#190: FILE: util/uri.c:229:
+    return (0);

ERROR: braces {} are necessary for all arms of this statement
#212: FILE: util/uri.c:262:
+        if (uri->cleanup & 2)
[...]
+        else
[...]

ERROR: braces {} are necessary for all arms of this statement
#276: FILE: util/uri.c:359:
+            if (uri->cleanup & 2)
[...]
+            else
[...]

ERROR: return is not a function, parentheses are not required
#282: FILE: util/uri.c:365:
+        return (0);

ERROR: return is not a function, parentheses are not required
#285: FILE: util/uri.c:367:
+    return (1);

ERROR: return is not a function, parentheses are not required
#305: FILE: util/uri.c:389:
+        return (1);

ERROR: braces {} are necessary for all arms of this statement
#306: FILE: util/uri.c:390:
+    if (!ISA_DIGIT(cur + 1))
[...]
+    else if ((*cur != '0') && (ISA_DIGIT(cur + 1)) && (!ISA_DIGIT(cur + 2)))
[...]
     else if ((*cur == '1') && (ISA_DIGIT(cur + 1)) && (ISA_DIGIT(cur + 2)))
[...]
-    else if ((*cur == '2') && (*(cur + 1) >= '0') &&
[...]
-    else if ((*cur == '2') && (*(cur + 1) == '5') &&
[...]
+        cur += 3;
[...]

ERROR: braces {} are necessary for all arms of this statement
#308: FILE: util/uri.c:392:
+    else if ((*cur != '0') && (ISA_DIGIT(cur + 1)) && (!ISA_DIGIT(cur + 2)))
[...]
     else if ((*cur == '1') && (ISA_DIGIT(cur + 1)) && (ISA_DIGIT(cur + 2)))
[...]
-    else if ((*cur == '2') && (*(cur + 1) >= '0') &&
[...]
-    else if ((*cur == '2') && (*(cur + 1) == '5') &&
[...]
+        cur += 3;
[...]

ERROR: braces {} are necessary for all arms of this statement
#319: FILE: util/uri.c:396:
+    else if ((*cur == '2') && (*(cur + 1) >= '0') && (*(cur + 1) <= '4') &&
[...]
+    else if ((*cur == '2') && (*(cur + 1) == '5') && (*(cur + 2) >= '0') &&
[...]
     else
[...]

ERROR: braces {} are necessary for all arms of this statement
#322: FILE: util/uri.c:399:
+    else if ((*cur == '2') && (*(cur + 1) == '5') && (*(cur + 2) >= '0') &&
[...]
     else
[...]

ERROR: return is not a function, parentheses are not required
#327: FILE: util/uri.c:403:
+        return (1);

ERROR: return is not a function, parentheses are not required
#330: FILE: util/uri.c:405:
+    return (0);

ERROR: braces {} are necessary even for single statement blocks
#354: FILE: util/uri.c:433:
+        while ((*cur != ']') && (*cur != 0))
+            cur++;

ERROR: braces {} are necessary for all arms of this statement
#356: FILE: util/uri.c:435:
+        if (*cur != ']')
[...]

ERROR: return is not a function, parentheses are not required
#357: FILE: util/uri.c:436:
+            return (1);

ERROR: braces {} are necessary for all arms of this statement
#371: FILE: util/uri.c:446:
+        if (*cur != '.')
[...]

ERROR: braces {} are necessary for all arms of this statement
#379: FILE: util/uri.c:451:
+        if (*cur != '.')
[...]

ERROR: braces {} are necessary for all arms of this statement
#386: FILE: util/uri.c:455:
+        if (*cur != '.')
[...]

ERROR: braces {} are necessary for all arms of this statement
#412: FILE: util/uri.c:473:
+        if (cur != host) {
[...]
+        } else
[...]

ERROR: braces {} are necessary for all arms of this statement
#413: FILE: util/uri.c:474:
+            if (uri->cleanup & 2)
[...]
+            else
[...]

ERROR: return is not a function, parentheses are not required
#422: FILE: util/uri.c:482:
+    return (0);

ERROR: braces {} are necessary for all arms of this statement
#441: FILE: util/uri.c:512:
+    if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#442: FILE: util/uri.c:513:
+        return (ret);

ERROR: braces {} are necessary for all arms of this statement
#447: FILE: util/uri.c:517:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#448: FILE: util/uri.c:518:
+            return (ret);

ERROR: return is not a function, parentheses are not required
#452: FILE: util/uri.c:521:
+    return (0);

ERROR: return is not a function, parentheses are not required
#471: FILE: util/uri.c:547:
+            return (0);

ERROR: return is not a function, parentheses are not required
#472: FILE: util/uri.c:548:
+        return (1);

ERROR: return is not a function, parentheses are not required
#494: FILE: util/uri.c:579:
+            return (ret);

ERROR: return is not a function, parentheses are not required
#513: FILE: util/uri.c:616:
+        return (1);

ERROR: return is not a function, parentheses are not required
#526: FILE: util/uri.c:624:
+                return (ret);

ERROR: braces {} are necessary for all arms of this statement
#546: FILE: util/uri.c:662:
+    if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#547: FILE: util/uri.c:663:
+        return (ret);

ERROR: return is not a function, parentheses are not required
#554: FILE: util/uri.c:668:
+            return (ret);

ERROR: braces {} are necessary for all arms of this statement
#573: FILE: util/uri.c:705:
+    if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#574: FILE: util/uri.c:706:
+        return (ret);

ERROR: return is not a function, parentheses are not required
#581: FILE: util/uri.c:711:
+            return (ret);

ERROR: braces {} are necessary for all arms of this statement
#606: FILE: util/uri.c:753:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#607: FILE: util/uri.c:754:
+            return (ret);

ERROR: braces {} are necessary for all arms of this statement
#609: FILE: util/uri.c:756:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#610: FILE: util/uri.c:757:
+            return (ret);

ERROR: return is not a function, parentheses are not required
#612: FILE: util/uri.c:759:
+        return (0);

ERROR: braces {} are necessary for all arms of this statement
#616: FILE: util/uri.c:762:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#617: FILE: util/uri.c:763:
+            return (ret);

ERROR: braces {} are necessary for all arms of this statement
#621: FILE: util/uri.c:766:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#622: FILE: util/uri.c:767:
+            return (ret);

ERROR: braces {} are necessary for all arms of this statement
#653: FILE: util/uri.c:802:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#654: FILE: util/uri.c:803:
+            return (ret);

ERROR: braces {} are necessary for all arms of this statement
#656: FILE: util/uri.c:805:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#657: FILE: util/uri.c:806:
+            return (ret);

ERROR: braces {} are necessary for all arms of this statement
#662: FILE: util/uri.c:809:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#663: FILE: util/uri.c:810:
+            return (ret);

ERROR: braces {} are necessary for all arms of this statement
#667: FILE: util/uri.c:813:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#668: FILE: util/uri.c:814:
+            return (ret);

ERROR: braces {} are necessary for all arms of this statement
#687: FILE: util/uri.c:826:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#688: FILE: util/uri.c:827:
+            return (ret);

ERROR: braces {} are necessary for all arms of this statement
#696: FILE: util/uri.c:832:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#697: FILE: util/uri.c:833:
+            return (ret);

ERROR: return is not a function, parentheses are not required
#703: FILE: util/uri.c:837:
+        return (1);

ERROR: return is not a function, parentheses are not required
#706: FILE: util/uri.c:839:
+    return (0);

ERROR: braces {} are necessary for all arms of this statement
#725: FILE: util/uri.c:859:
+    if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#726: FILE: util/uri.c:860:
+        return (ret);

ERROR: return is not a function, parentheses are not required
#729: FILE: util/uri.c:862:
+        return (1);

ERROR: braces {} are necessary for all arms of this statement
#734: FILE: util/uri.c:866:
+    if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#735: FILE: util/uri.c:867:
+        return (ret);

ERROR: braces {} are necessary for all arms of this statement
#742: FILE: util/uri.c:871:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#743: FILE: util/uri.c:872:
+            return (ret);

ERROR: braces {} are necessary for all arms of this statement
#751: FILE: util/uri.c:877:
+        if (ret != 0)
[...]

ERROR: return is not a function, parentheses are not required
#752: FILE: util/uri.c:878:
+            return (ret);

ERROR: return is not a function, parentheses are not required
#758: FILE: util/uri.c:882:
+        return (1);

ERROR: return is not a function, parentheses are not required
#761: FILE: util/uri.c:884:
+    return (0);

ERROR: return is not a function, parentheses are not required
#777: FILE: util/uri.c:904:
+        return (-1);

ERROR: return is not a function, parentheses are not required
#794: FILE: util/uri.c:917:
+            return (ret);

ERROR: return is not a function, parentheses are not required
#798: FILE: util/uri.c:920:
+    return (0);

ERROR: return is not a function, parentheses are not required
#815: FILE: util/uri.c:939:
+        return (NULL);

ERROR: return is not a function, parentheses are not required
#821: FILE: util/uri.c:944:
+        return (NULL);

ERROR: return is not a function, parentheses are not required
#824: FILE: util/uri.c:946:
+    return (uri);

ERROR: return is not a function, parentheses are not required
#837: FILE: util/uri.c:963:
+    return (rfc3986_parse_uri_reference(uri, str));

ERROR: return is not a function, parentheses are not required
#854: FILE: util/uri.c:983:
+        return (NULL);

ERROR: return is not a function, parentheses are not required
#863: FILE: util/uri.c:991:
+        return (NULL);

ERROR: return is not a function, parentheses are not required
#866: FILE: util/uri.c:993:
+    return (uri);

ERROR: return is not a function, parentheses are not required
#891: FILE: util/uri.c:1014:
+    return (ret);

ERROR: return is not a function, parentheses are not required
#910: FILE: util/uri.c:1031:
+    return (temp);

ERROR: braces {} are necessary for all arms of this statement
#930: FILE: util/uri.c:1050:
+    if (uri == NULL)
[...]

ERROR: return is not a function, parentheses are not required
#931: FILE: util/uri.c:1051:
+        return (NULL);

ERROR: braces {} are necessary for all arms of this statement
#983: FILE: util/uri.c:1079:
+            if (IS_RESERVED(*(p)) || IS_UNRESERVED(*(p)))
[...]
+            else {
[...]

ERROR: braces {} are necessary for all arms of this statement
#1033: FILE: util/uri.c:1104:
+                    if ((IS_UNRESERVED(*(p))) || ((*(p) == ';')) ||
[...]
+                    else {
[...]

ERROR: braces {} are necessary for all arms of this statement
#1117: FILE: util/uri.c:1150:
+                if ((IS_UNRESERVED(*(p))) || ((*(p) == '$')) ||
[...]
+                else {
[...]

ERROR: braces {} are necessary for all arms of this statement
#1187: FILE: util/uri.c:1194:
+                if ((IS_UNRESERVED(*(p))) || ((*(p) == '/')) ||
[...]
-               else {
[...]

ERROR: braces {} are necessary for all arms of this statement
#1269: FILE: util/uri.c:1236:
+            if ((IS_UNRESERVED(*(p))) || (IS_RESERVED(*(p))))
[...]
+            else {
[...]

ERROR: return is not a function, parentheses are not required
#1286: FILE: util/uri.c:1252:
+    return (ret);

ERROR: braces {} are necessary for all arms of this statement
#1299: FILE: util/uri.c:1263:
+    if (uri == NULL)
[...]

ERROR: return is not a function, parentheses are not required
#1338: FILE: util/uri.c:1318:
+        return (-1);

ERROR: return is not a function, parentheses are not required
#1349: FILE: util/uri.c:1327:
+        return (0);

ERROR: braces {} are necessary even for single statement blocks
#1375: FILE: util/uri.c:1343:
+            while (cur[0] == '/')
+                cur++;

ERROR: braces {} are necessary for all arms of this statement
#1390: FILE: util/uri.c:1352:
+        if ((cur[0] == '.') && (cur[1] == '\0'))
[...]

ERROR: braces {} are necessary even for single statement blocks
#1408: FILE: util/uri.c:1362:
+        while ((cur[0] == '/') && (cur[1] == '/'))
+            cur++;

ERROR: return is not a function, parentheses are not required
#1424: FILE: util/uri.c:1375:
+        return (0);

ERROR: braces {} are necessary even for single statement blocks
#1517: FILE: util/uri.c:1482:
+            while (cur[0] != '\0')
+                (out++)[0] = (cur++)[0];

ERROR: return is not a function, parentheses are not required
#1524: FILE: util/uri.c:1488:
+    return (0);

ERROR: braces {} are necessary for all arms of this statement
#1532: FILE: util/uri.c:1493:
+    if (((c >= '0') && (c <= '9')) || ((c >= 'a') && (c <= 'f')) ||
[...]

ERROR: return is not a function, parentheses are not required
#1536: FILE: util/uri.c:1495:
+        return (1);

ERROR: return is not a function, parentheses are not required
#1537: FILE: util/uri.c:1496:
+    return (0);

ERROR: return is not a function, parentheses are not required
#1559: FILE: util/uri.c:1519:
+        return (NULL);

ERROR: braces {} are necessary for all arms of this statement
#1560: FILE: util/uri.c:1520:
+    if (len <= 0)
[...]

ERROR: braces {} are necessary for all arms of this statement
#1562: FILE: util/uri.c:1522:
+    if (len < 0)
[...]

ERROR: return is not a function, parentheses are not required
#1563: FILE: util/uri.c:1523:
+        return (NULL);

ERROR: braces {} are necessary for all arms of this statement
#1599: FILE: util/uri.c:1534:
+            if ((*in >= '0') && (*in <= '9'))
[...]
+            else if ((*in >= 'a') && (*in <= 'f'))
[...]
+            else if ((*in >= 'A') && (*in <= 'F'))
[...]

ERROR: braces {} are necessary for all arms of this statement
#1601: FILE: util/uri.c:1536:
+            else if ((*in >= 'a') && (*in <= 'f'))
[...]
+            else if ((*in >= 'A') && (*in <= 'F'))
[...]

ERROR: braces {} are necessary for all arms of this statement
#1603: FILE: util/uri.c:1538:
+            else if ((*in >= 'A') && (*in <= 'F'))
[...]

ERROR: braces {} are necessary for all arms of this statement
#1606: FILE: util/uri.c:1541:
+            if ((*in >= '0') && (*in <= '9'))
[...]
+            else if ((*in >= 'a') && (*in <= 'f'))
[...]
+            else if ((*in >= 'A') && (*in <= 'F'))
[...]

ERROR: braces {} are necessary for all arms of this statement
#1608: FILE: util/uri.c:1543:
+            else if ((*in >= 'a') && (*in <= 'f'))
[...]
+            else if ((*in >= 'A') && (*in <= 'F'))
[...]

ERROR: braces {} are necessary for all arms of this statement
#1610: FILE: util/uri.c:1545:
+            else if ((*in >= 'A') && (*in <= 'F'))
[...]

ERROR: return is not a function, parentheses are not required
#1622: FILE: util/uri.c:1556:
+    return (ret);

ERROR: return is not a function, parentheses are not required
#1641: FILE: util/uri.c:1577:
+        return (NULL);

ERROR: return is not a function, parentheses are not required
#1644: FILE: util/uri.c:1579:
+        return (g_strdup(str));

ERROR: braces {} are necessary for all arms of this statement
#1647: FILE: util/uri.c:1581:
+    if (!(len > 0))
[...]

ERROR: return is not a function, parentheses are not required
#1648: FILE: util/uri.c:1582:
+        return (NULL);

ERROR: braces {} are necessary for all arms of this statement
#1689: FILE: util/uri.c:1600:
+            if (val <= 9)
[...]
+            else
[...]

ERROR: braces {} are necessary for all arms of this statement
#1694: FILE: util/uri.c:1605:
+            if (val <= 9)
[...]
+            else
[...]

ERROR: return is not a function, parentheses are not required
#1705: FILE: util/uri.c:1615:
+    return (ret);

ERROR: braces {} are necessary for all arms of this statement
#1742: FILE: util/uri.c:1658:
+        if (*uri) {
[...]
+        } else
[...]

ERROR: braces {} are necessary for all arms of this statement
#1776: FILE: util/uri.c:1680:
+        if (ref)
[...]

ERROR: braces {} are necessary for all arms of this statement
#1806: FILE: util/uri.c:1710:
+        if (bas->authority != NULL)
[...]
+        else if (bas->server != NULL) {
[...]

ERROR: braces {} are necessary for all arms of this statement
#1846: FILE: util/uri.c:1750:
+        if (ref->authority != NULL)
[...]
+        else {
[...]

ERROR: braces {} are necessary even for single statement blocks
#1905: FILE: util/uri.c:1802:
+            while ((bas->path[cur] != 0) && (bas->path[cur] != '/'))
+                cur++;

ERROR: braces {} are necessary for all arms of this statement
#1907: FILE: util/uri.c:1804:
+            if (bas->path[cur] == 0)
[...]

ERROR: braces {} are necessary for all arms of this statement
#1942: FILE: util/uri.c:1825:
+        if ((out == 0) && (bas->server != NULL))
[...]

ERROR: return is not a function, parentheses are not required
#1963: FILE: util/uri.c:1854:
+    return (val);

ERROR: braces {} are necessary for all arms of this statement
#1995: FILE: util/uri.c:1912:
+        if (ret != 0)
[...]

ERROR: braces {} are necessary for all arms of this statement
#2017: FILE: util/uri.c:1927:
+        if (ret != 0)
[...]

ERROR: braces {} are necessary for all arms of this statement
#2073: FILE: util/uri.c:1965:
+            if (*uptr == '/')
[...]

ERROR: braces {} are necessary for all arms of this statement
#2089: FILE: util/uri.c:1975:
+            if (bptr[ix] == '/')
[...]

ERROR: braces {} are necessary for all arms of this statement
#2102: FILE: util/uri.c:1984:
+        if ((ref->path[pos] == '.') && (ref->path[pos + 1] == '/'))
[...]

ERROR: braces {} are necessary for all arms of this statement
#2105: FILE: util/uri.c:1986:
+        if ((*bptr == '.') && (bptr[1] == '/'))
[...]
-       else if ((*bptr == '/') && (ref->path[pos] != '/'))
[...]

ERROR: braces {} are necessary for all arms of this statement
#2111: FILE: util/uri.c:1988:
+        else if ((*bptr == '/') && (ref->path[pos] != '/'))
[...]

ERROR: braces {} are necessary even for single statement blocks
#2113: FILE: util/uri.c:1990:
+        while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0))
+            pos++;

ERROR: braces {} are necessary for all arms of this statement
#2149: FILE: util/uri.c:2003:
+        if ((ref->path[ix] == '/') && (ix > 0))
[...]
+        else if ((ref->path[ix] == 0) && (ix > 1) && (ref->path[ix - 1] == 
'/'))
[...]

ERROR: braces {} are necessary for all arms of this statement
#2151: FILE: util/uri.c:2005:
+        else if ((ref->path[ix] == 0) && (ix > 1) && (ref->path[ix - 1] == 
'/'))
[...]

ERROR: braces {} are necessary for all arms of this statement
#2154: FILE: util/uri.c:2008:
+            if (ref->path[ix] == '/')
[...]

ERROR: braces {} are necessary for all arms of this statement
#2179: FILE: util/uri.c:2023:
+                if (bptr[ix] == '/')
[...]

ERROR: braces {} are necessary for all arms of this statement
#2191: FILE: util/uri.c:2031:
+        if (uptr != NULL)
[...]

ERROR: braces {} are necessary for all arms of this statement
#2272: FILE: util/uri.c:2096:
+    if (init_alloc <= 0)
[...]

ERROR: braces {} are necessary for all arms of this statement
#2341: FILE: util/uri.c:2159:
+        if (eq && eq >= end)
[...]

ERROR: braces {} are necessary for all arms of this statement
#2383: FILE: util/uri.c:2199:
+        if (*query)
[...]

total: 147 errors, 0 warnings, 2299 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/6: util/uri.c: remove brackets that wrap `return` statement's 
content....
Checking PATCH 3/6: util/uri.c: wrap single statement blocks with braces {}...
Checking PATCH 4/6: tests/libqos: Check for valid dev pointer when looking for 
PCI devices...
Checking PATCH 5/6: Add a git-publish configuration file...
Checking PATCH 6/6: README: Document 'git-publish' workflow...
=== OUTPUT END ===

Test command exited with code: 1


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]