qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 0/4] Allow custom socket option in socket_listen a


From: no-reply
Subject: Re: [Qemu-devel] [RFC 0/4] Allow custom socket option in socket_listen and socket_connect
Date: Mon, 29 Jan 2018 11:47:16 -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] [RFC 0/4] Allow custom socket option in socket_listen and 
socket_connect

=== 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

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
Switched to a new branch 'test'
e14ef46352 net/socket: change net_socket_connect_init to use functions in 
sockets.h
e72c98470f net/socket: change net_socket_listen_init to use functions in 
include/qemu/sockets.h
f820da9f2e qemu-socket: Allow custom socket options in socket_connect
8849322e0a qemu-socket: Allow custom socket option in socket_listen

=== OUTPUT BEGIN ===
Checking PATCH 1/4: qemu-socket: Allow custom socket option in socket_listen...
ERROR: space required before the open parenthesis '('
#99: FILE: util/qemu-sockets.c:204:
+    if(!sconf) {

ERROR: space required before the open parenthesis '('
#104: FILE: util/qemu-sockets.c:209:
+    if(sconf->nonblocking) {

ERROR: trailing whitespace
#106: FILE: util/qemu-sockets.c:211:
+    } $

ERROR: space required before the open parenthesis '('
#108: FILE: util/qemu-sockets.c:213:
+    for(sopt = sconf->options; sopt; sopt = sopt->next) {

ERROR: trailing whitespace
#109: FILE: util/qemu-sockets.c:214:
+        if(sopt->level < IPPROTO_IP || sopt->optname < SO_DEBUG || $

ERROR: space required before the open parenthesis '('
#109: FILE: util/qemu-sockets.c:214:
+        if(sopt->level < IPPROTO_IP || sopt->optname < SO_DEBUG || 

ERROR: Error messages should not contain newlines
#111: FILE: util/qemu-sockets.c:216:
+            error_setg(errp, "Invalid socket option:\n"

ERROR: Error messages should not contain newlines
#112: FILE: util/qemu-sockets.c:217:
+                             "level=%d, optname=%d, optval=%p, optlen=%d\n",

ERROR: trailing whitespace
#116: FILE: util/qemu-sockets.c:221:
+        qemu_setsockopt(fd, sopt->level, sopt->optname, $

ERROR: space required before the open parenthesis '('
#135: FILE: util/qemu-sockets.c:320:
+            if(parse_socket_options(slisten, errp, sconf) < 0) {

ERROR: space required before the open parenthesis '('
#157: FILE: util/qemu-sockets.c:755:
+    if(parse_socket_options(slisten, errp, sconf) < 0) {

ERROR: space required before the open parenthesis '('
#190: FILE: util/qemu-sockets.c:840:
+    if(parse_socket_options(sock, errp, sconf) < 0) {

total: 12 errors, 0 warnings, 201 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/4: qemu-socket: Allow custom socket options in 
socket_connect...
ERROR: space required before the open parenthesis '('
#103: FILE: util/qemu-sockets.c:390:
+    if(parse_socket_options(sock, errp, sconf) < 0) {

WARNING: line over 80 characters
#114: FILE: util/qemu-sockets.c:401:
+        /* More judge for nonblocking socket, borrowed from 
net_socket_connect_init */

ERROR: space required before the open parenthesis '('
#115: FILE: util/qemu-sockets.c:402:
+        if(sconf->nonblocking) {

ERROR: space required before the open parenthesis '('
#116: FILE: util/qemu-sockets.c:403:
+            if(rc == -EWOULDBLOCK)

ERROR: braces {} are necessary for all arms of this statement
#116: FILE: util/qemu-sockets.c:403:
+            if(rc == -EWOULDBLOCK)
[...]
+            else if(rc == -EINPROGRESS ||
[...]

ERROR: space required before the open parenthesis '('
#118: FILE: util/qemu-sockets.c:405:
+            else if(rc == -EINPROGRESS ||

ERROR: braces {} are necessary for all arms of this statement
#118: FILE: util/qemu-sockets.c:405:
+            else if(rc == -EINPROGRESS ||
[...]

ERROR: space required before the open parenthesis '('
#168: FILE: util/qemu-sockets.c:725:
+    if(parse_socket_options(sock, errp, sconf) < 0) {

ERROR: space required before the open parenthesis '('
#179: FILE: util/qemu-sockets.c:736:
+        if(sconf->nonblocking) {

ERROR: space required before the open parenthesis '('
#180: FILE: util/qemu-sockets.c:737:
+            if(rc == -EWOULDBLOCK)

ERROR: braces {} are necessary for all arms of this statement
#180: FILE: util/qemu-sockets.c:737:
+            if(rc == -EWOULDBLOCK)
[...]
+            else if(rc == -EINPROGRESS ||
[...]

ERROR: space required before the open parenthesis '('
#182: FILE: util/qemu-sockets.c:739:
+            else if(rc == -EINPROGRESS ||

ERROR: braces {} are necessary for all arms of this statement
#182: FILE: util/qemu-sockets.c:739:
+            else if(rc == -EINPROGRESS ||
[...]

ERROR: space required before the open parenthesis '('
#233: FILE: util/qemu-sockets.c:956:
+    if(parse_socket_options(sock, errp, sconf) < 0) {

WARNING: line over 80 characters
#245: FILE: util/qemu-sockets.c:978:
+        /* More judge for nonblocking socket, borrowed from 
net_socket_connect_init */

ERROR: space required before the open parenthesis '('
#246: FILE: util/qemu-sockets.c:979:
+        if(sconf->nonblocking) {

ERROR: space required before the open parenthesis '('
#247: FILE: util/qemu-sockets.c:980:
+            if(rc == -EWOULDBLOCK)

ERROR: braces {} are necessary for all arms of this statement
#247: FILE: util/qemu-sockets.c:980:
+            if(rc == -EWOULDBLOCK)
[...]
+            else if(rc == -EINPROGRESS ||
[...]

ERROR: space required before the open parenthesis '('
#249: FILE: util/qemu-sockets.c:982:
+            else if(rc == -EINPROGRESS ||

ERROR: braces {} are necessary for all arms of this statement
#249: FILE: util/qemu-sockets.c:982:
+            else if(rc == -EINPROGRESS ||
[...]

total: 18 errors, 2 warnings, 246 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/4: net/socket: change net_socket_listen_init to use functions 
in include/qemu/sockets.h...
ERROR: space required before the open parenthesis '('
#30: FILE: net/socket.c:503:
+    if(NULL != local_err) {

ERROR: space required before the open parenthesis '('
#41: FILE: net/socket.c:511:
+    if(NULL == sconf) {

ERROR: space required before the open parenthesis '('
#64: FILE: net/socket.c:520:
+    if(fd < 0) {

total: 3 errors, 0 warnings, 62 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 4/4: net/socket: change net_socket_connect_init to use functions 
in sockets.h...
ERROR: space required before the open parenthesis '('
#30: FILE: net/socket.c:552:
+    if(NULL != local_err) {

ERROR: space required before the open parenthesis '('
#65: FILE: net/socket.c:563:
+    if(fd < 0) {

ERROR: space required before the open parenthesis '('
#70: FILE: net/socket.c:568:
+    } else if(errno != EINPROGRESS && errno != EALREADY && errno != EINVAL) {

total: 3 errors, 0 warnings, 71 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 address@hidden

reply via email to

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