qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULLv4 00/32] More work towards libslirp


From: no-reply
Subject: Re: [Qemu-devel] [PULLv4 00/32] More work towards libslirp
Date: Thu, 7 Feb 2019 06:59:32 -0800 (PST)

Patchew URL: https://patchew.org/QEMU/address@hidden/



Hi,

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

Subject: [Qemu-devel] [PULLv4 00/32] More work towards libslirp
Type: series
Message-id: address@hidden

=== TEST SCRIPT BEGIN ===
#!/bin/bash
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
   713acc316d..1dca054955  master     -> master
 * [new tag]               patchew/address@hidden -> patchew/address@hidden
 t [tag update]            patchew/address@hidden -> patchew/address@hidden
Switched to a new branch 'test'
33314ca993 slirp: API is extern C
def44b9e1f slirp: pass opaque to all callbacks
619e3c22a9 slirp: use polling callbacks, drop glib requirement
25ed9a94b9 slirp: remove slirp_instances list
766080e20c slirp: replace global polling with per-instance & notifier
19f0fbff0b slirp: improve send_packet() callback
0767ffe68b slirp: prefer c99 types over BSD kind
c862dcd06b slirp: replace remaining qemu headers dependency
ba4a673af8 slirp: Move g_spawn_async_with_fds_qemu compatibility to slirp/
114294c71e slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT
57ae54dfbb slirp: replace qemu qtailq with slirp own copy
f854704da1 slirp: replace net/eth.h inclusion with own defines
3e22f44481 slirp: remove now useless QEMU headers inclusions
626c91b06d slirp: remove qemu timer.h dependency
31ff9b5865 slirp: add slirp own version of pstrcpy
5de0bf1688 slirp: improve windows headers inclusion
0a644d3622 slirp: do not include qemu headers in libslirp.h public API header
3b5081836c slirp: move QEMU state saving to a separate unit
0714ba3864 slirp: replace qemu_notify_event() with a callback
7cb0bee111 slirp: add unregister_poll_fd() callback
bd2e721ae7 slirp: replace qemu_set_nonblock()
a014aaa497 slirp: replace most qemu socket utilities with slirp own version
4762ebf715 slirp: replace QEMU_PACKED with SLIRP_PACKED
98685cf72f slirp: replace trace functions with DEBUG calls
40df17f75a slirp: add callbacks for timer
f0223b5273 net/slirp: fix leaks on forwarding rule registration error
f4f2eb80b0 net/slirp: free forwarding rules on cleanup
73cf8f5d37 net/slirp: simplify checking for cmd: prefix
227239db78 slirp: generalize guestfwd with a callback based approach
96e2f65d10 slirp: Don't mark struct ipq or struct ipasfrag as packed
0185e3b3b9 slirp: Avoid marking naturally packed structs as QEMU_PACKED
52f09e0c1c slirp: Avoid unaligned 16bit memory access

=== OUTPUT BEGIN ===
1/32 Checking commit 52f09e0c1ccb (slirp: Avoid unaligned 16bit memory access)
2/32 Checking commit 0185e3b3b9ff (slirp: Avoid marking naturally packed 
structs as QEMU_PACKED)
3/32 Checking commit 96e2f65d109d (slirp: Don't mark struct ipq or struct 
ipasfrag as packed)
4/32 Checking commit 227239db78d4 (slirp: generalize guestfwd with a callback 
based approach)
ERROR: code indent should never use tabs
#148: FILE: slirp/misc.h:14:
+^ISlirpWriteCb write_cb;$

ERROR: code indent should never use tabs
#149: FILE: slirp/misc.h:15:
+^Ivoid *opaque;$

total: 2 errors, 0 warnings, 226 lines checked

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

5/32 Checking commit 73cf8f5d3774 (net/slirp: simplify checking for cmd: prefix)
6/32 Checking commit f4f2eb80b072 (net/slirp: free forwarding rules on cleanup)
7/32 Checking commit f0223b527316 (net/slirp: fix leaks on forwarding rule 
registration error)
8/32 Checking commit 40df17f75a79 (slirp: add callbacks for timer)
9/32 Checking commit 98685cf72fd0 (slirp: replace trace functions with DEBUG 
calls)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#100: 
deleted file mode 100644

total: 0 errors, 1 warnings, 62 lines checked

Patch 9/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/32 Checking commit 4762ebf7159d (slirp: replace QEMU_PACKED with 
SLIRP_PACKED)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#111: 
new file mode 100644

total: 0 errors, 1 warnings, 111 lines checked

Patch 10/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
11/32 Checking commit a014aaa49710 (slirp: replace most qemu socket utilities 
with slirp own version)
ERROR: code indent should never use tabs
#130: FILE: slirp/socket.c:190:
+^Inn = slirp_recv(so->s, iov[0].iov_base, iov[0].iov_len,0);$

ERROR: space required after that ',' (ctx:VxV)
#130: FILE: slirp/socket.c:190:
+       nn = slirp_recv(so->s, iov[0].iov_base, iov[0].iov_len,0);
                                                              ^

WARNING: line over 80 characters
#139: FILE: slirp/socket.c:206:
+                                       slirp_getsockopt(so->s, SOL_SOCKET, 
SO_ERROR,

ERROR: code indent should never use tabs
#139: FILE: slirp/socket.c:206:
+^I^I^I^I^Islirp_getsockopt(so->s, SOL_SOCKET, SO_ERROR,$

ERROR: space required after that ',' (ctx:VxV)
#148: FILE: slirp/socket.c:236:
+            ret = slirp_recv(so->s, iov[1].iov_base, iov[1].iov_len,0);
                                                                    ^

ERROR: code indent should never use tabs
#157: FILE: slirp/socket.c:557:
+^I  slirp_ioctlsocket(so->s, FIONREAD, &n);$

ERROR: code indent should never use tabs
#167: FILE: slirp/socket.c:722:
+^Iif (((s = slirp_socket(AF_INET,SOCK_STREAM,0)) < 0) ||$

ERROR: space required after that ',' (ctx:VxV)
#167: FILE: slirp/socket.c:722:
+       if (((s = slirp_socket(AF_INET,SOCK_STREAM,0)) < 0) ||
                                      ^

ERROR: space required after that ',' (ctx:VxV)
#167: FILE: slirp/socket.c:722:
+       if (((s = slirp_socket(AF_INET,SOCK_STREAM,0)) < 0) ||
                                                  ^

ERROR: do not use assignment in if condition
#167: FILE: slirp/socket.c:722:
+       if (((s = slirp_socket(AF_INET,SOCK_STREAM,0)) < 0) ||

ERROR: code indent should never use tabs
#168: FILE: slirp/socket.c:723:
+^I    (slirp_socket_set_fast_reuse(s) < 0) ||$

ERROR: code indent should never use tabs
#184: FILE: slirp/socket.c:740:
+^Islirp_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(int));$

ERROR: code indent should never use tabs
#187: FILE: slirp/socket.c:742:
+^Islirp_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(int));$

ERROR: code indent should never use tabs
#200: FILE: slirp/tcp_subr.c:340:
+^Islirp_closesocket(so->s);$

ERROR: code indent should never use tabs
#267: FILE: slirp/udp.c:295:
+^Islirp_closesocket(so->s);$

ERROR: code indent should never use tabs
#276: FILE: slirp/udp.c:330:
+^Iso->s = slirp_socket(AF_INET,SOCK_DGRAM,0);$

ERROR: space required after that ',' (ctx:VxV)
#276: FILE: slirp/udp.c:330:
+       so->s = slirp_socket(AF_INET,SOCK_DGRAM,0);
                                    ^

ERROR: space required after that ',' (ctx:VxV)
#276: FILE: slirp/udp.c:330:
+       so->s = slirp_socket(AF_INET,SOCK_DGRAM,0);
                                               ^

ERROR: code indent should never use tabs
#285: FILE: slirp/udp.c:346:
+^Islirp_socket_set_fast_reuse(so->s);$

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#290: 
new file mode 100644

ERROR: return of an errno should typically be -ve (return -EINTR)
#379: FILE: slirp/util.c:85:
+        return EINTR;

ERROR: return of an errno should typically be -ve (return -EINVAL)
#381: FILE: slirp/util.c:87:
+        return EINVAL;

ERROR: return of an errno should typically be -ve (return -EBADF)
#383: FILE: slirp/util.c:89:
+        return EBADF;

ERROR: return of an errno should typically be -ve (return -ENOMEM)
#385: FILE: slirp/util.c:91:
+        return ENOMEM;

ERROR: return of an errno should typically be -ve (return -EINVAL)
#387: FILE: slirp/util.c:93:
+        return EINVAL;

ERROR: return of an errno should typically be -ve (return -ENAMETOOLONG)
#389: FILE: slirp/util.c:95:
+        return ENAMETOOLONG;

ERROR: return of an errno should typically be -ve (return -ENOTEMPTY)
#391: FILE: slirp/util.c:97:
+        return ENOTEMPTY;

WARNING: Block comments use a leading /* on a separate line
#393: FILE: slirp/util.c:99:
+         /* not using EWOULDBLOCK as we don't want code to have

WARNING: Block comments use a trailing */ on a separate line
#394: FILE: slirp/util.c:100:
+          * to check both EWOULDBLOCK and EAGAIN */

ERROR: return of an errno should typically be -ve (return -EAGAIN)
#395: FILE: slirp/util.c:101:
+        return EAGAIN;

ERROR: return of an errno should typically be -ve (return -EINPROGRESS)
#397: FILE: slirp/util.c:103:
+        return EINPROGRESS;

ERROR: return of an errno should typically be -ve (return -EALREADY)
#399: FILE: slirp/util.c:105:
+        return EALREADY;

ERROR: return of an errno should typically be -ve (return -ENOTSOCK)
#401: FILE: slirp/util.c:107:
+        return ENOTSOCK;

ERROR: return of an errno should typically be -ve (return -EDESTADDRREQ)
#403: FILE: slirp/util.c:109:
+        return EDESTADDRREQ;

ERROR: return of an errno should typically be -ve (return -EMSGSIZE)
#405: FILE: slirp/util.c:111:
+        return EMSGSIZE;

ERROR: return of an errno should typically be -ve (return -EPROTOTYPE)
#407: FILE: slirp/util.c:113:
+        return EPROTOTYPE;

ERROR: return of an errno should typically be -ve (return -ENOPROTOOPT)
#409: FILE: slirp/util.c:115:
+        return ENOPROTOOPT;

ERROR: return of an errno should typically be -ve (return -EPROTONOSUPPORT)
#411: FILE: slirp/util.c:117:
+        return EPROTONOSUPPORT;

ERROR: return of an errno should typically be -ve (return -EOPNOTSUPP)
#413: FILE: slirp/util.c:119:
+        return EOPNOTSUPP;

ERROR: return of an errno should typically be -ve (return -EAFNOSUPPORT)
#415: FILE: slirp/util.c:121:
+        return EAFNOSUPPORT;

ERROR: return of an errno should typically be -ve (return -EADDRINUSE)
#417: FILE: slirp/util.c:123:
+        return EADDRINUSE;

ERROR: return of an errno should typically be -ve (return -EADDRNOTAVAIL)
#419: FILE: slirp/util.c:125:
+        return EADDRNOTAVAIL;

ERROR: return of an errno should typically be -ve (return -ENETDOWN)
#421: FILE: slirp/util.c:127:
+        return ENETDOWN;

ERROR: return of an errno should typically be -ve (return -ENETUNREACH)
#423: FILE: slirp/util.c:129:
+        return ENETUNREACH;

ERROR: return of an errno should typically be -ve (return -ENETRESET)
#425: FILE: slirp/util.c:131:
+        return ENETRESET;

ERROR: return of an errno should typically be -ve (return -ECONNABORTED)
#427: FILE: slirp/util.c:133:
+        return ECONNABORTED;

ERROR: return of an errno should typically be -ve (return -ECONNRESET)
#429: FILE: slirp/util.c:135:
+        return ECONNRESET;

ERROR: return of an errno should typically be -ve (return -ENOBUFS)
#431: FILE: slirp/util.c:137:
+        return ENOBUFS;

ERROR: return of an errno should typically be -ve (return -EISCONN)
#433: FILE: slirp/util.c:139:
+        return EISCONN;

ERROR: return of an errno should typically be -ve (return -ENOTCONN)
#435: FILE: slirp/util.c:141:
+        return ENOTCONN;

ERROR: return of an errno should typically be -ve (return -ETIMEDOUT)
#437: FILE: slirp/util.c:143:
+        return ETIMEDOUT;

ERROR: return of an errno should typically be -ve (return -ECONNREFUSED)
#439: FILE: slirp/util.c:145:
+        return ECONNREFUSED;

ERROR: return of an errno should typically be -ve (return -ELOOP)
#441: FILE: slirp/util.c:147:
+        return ELOOP;

ERROR: return of an errno should typically be -ve (return -EHOSTUNREACH)
#443: FILE: slirp/util.c:149:
+        return EHOSTUNREACH;

ERROR: return of an errno should typically be -ve (return -EIO)
#445: FILE: slirp/util.c:151:
+        return EIO;

WARNING: line over 80 characters
#514: FILE: slirp/util.h:61:
+#define slirp_recv(sockfd, buf, len, flags) recv(sockfd, (void *)buf, len, 
flags)

WARNING: Block comments use a leading /* on a separate line
#537: FILE: slirp/util.h:84:
+    /* Enabling the reuse of an endpoint that was used by a socket still in

WARNING: Block comments use a trailing */ on a separate line
#541: FILE: slirp/util.h:88:
+     * http://msdn.microsoft.com/en-us/library/windows/desktop/ms740621.aspx */

total: 51 errors, 7 warnings, 477 lines checked

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

12/32 Checking commit bd2e721ae757 (slirp: replace qemu_set_nonblock())
13/32 Checking commit 7cb0bee1113c (slirp: add unregister_poll_fd() callback)
ERROR: code indent should never use tabs
#87: FILE: slirp/tcp_subr.c:340:
+^Iso->slirp->cb->unregister_poll_fd(so->s);$

ERROR: code indent should never use tabs
#107: FILE: slirp/udp.c:295:
+^Iso->slirp->cb->unregister_poll_fd(so->s);$

total: 2 errors, 0 warnings, 63 lines checked

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

14/32 Checking commit 0714ba3864d3 (slirp: replace qemu_notify_event() with a 
callback)
ERROR: code indent should never use tabs
#115: FILE: slirp/tcp_input.c:509:
+^I^I^I^Isodrop(so, acked);$

ERROR: code indent should never use tabs
#124: FILE: slirp/tcp_input.c:1121:
+^I^I^Isodrop(so, (int)so->so_snd.sb_cc);$

ERROR: code indent should never use tabs
#128: FILE: slirp/tcp_input.c:1124:
+^I^I^Isodrop(so, acked);$

total: 3 errors, 0 warnings, 79 lines checked

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

15/32 Checking commit 3b5081836c51 (slirp: move QEMU state saving to a separate 
unit)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#455: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#547: FILE: slirp/state.c:88:
+/* The sbuf has a pair of pointers that are migrated as offsets;

WARNING: Block comments use a leading /* on a separate line
#645: FILE: slirp/state.c:186:
+/* The OS provided ss_family field isn't that portable; it's size

ERROR: if this code is redundant consider removing it
#715: FILE: slirp/state.c:256:
+#if 0

total: 1 errors, 3 warnings, 475 lines checked

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

16/32 Checking commit 0a644d36220d (slirp: do not include qemu headers in 
libslirp.h public API header)
17/32 Checking commit 5de0bf168845 (slirp: improve windows headers inclusion)
18/32 Checking commit 31ff9b5865a3 (slirp: add slirp own version of pstrcpy)
WARNING: line over 80 characters
#37: FILE: slirp/tftp.c:219:
+  slirp_pstrcpy((char *)tp->x.tp_error.tp_msg, sizeof(tp->x.tp_error.tp_msg), 
msg);

ERROR: braces {} are necessary for all arms of this statement
#55: FILE: slirp/util.c:197:
+    if (buf_size <= 0)
[...]

ERROR: space required before the open parenthesis '('
#58: FILE: slirp/util.c:200:
+    for(;;) {

ERROR: braces {} are necessary for all arms of this statement
#60: FILE: slirp/util.c:202:
+        if (c == 0 || q >= buf + buf_size - 1)
[...]

total: 3 errors, 1 warnings, 44 lines checked

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

19/32 Checking commit 626c91b06dba (slirp: remove qemu timer.h dependency)
20/32 Checking commit 3e22f44481de (slirp: remove now useless QEMU headers 
inclusions)
21/32 Checking commit f854704da1d5 (slirp: replace net/eth.h inclusion with own 
defines)
22/32 Checking commit 57ae54dfbb62 (slirp: replace qemu qtailq with slirp own 
copy)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#12: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#76: FILE: slirp/qtailq.h:60:
+        struct type *tqh_first;       /* first element */               \

WARNING: Block comments use a leading /* on a separate line
#77: FILE: slirp/qtailq.h:61:
+        QTailQLink tqh_circ;          /* link for circular backwards list */ \

WARNING: Block comments use a leading /* on a separate line
#85: FILE: slirp/qtailq.h:69:
+        struct type *tqe_next;        /* next element */                \

WARNING: Block comments use a leading /* on a separate line
#86: FILE: slirp/qtailq.h:70:
+        QTailQLink tqe_circ;          /* link for circular backwards list */ \

WARNING: Block comments use a leading /* on a separate line
#92: FILE: slirp/qtailq.h:76:
+} while (/*CONSTCOND*/0)

ERROR: do not use assignment in if condition
#95: FILE: slirp/qtailq.h:79:
+        if (((elm)->field.tqe_next = (head)->tqh_first) != NULL)        \

WARNING: Block comments use a leading /* on a separate line
#102: FILE: slirp/qtailq.h:86:
+} while (/*CONSTCOND*/0)

WARNING: Block comments use a leading /* on a separate line
#109: FILE: slirp/qtailq.h:93:
+} while (/*CONSTCOND*/0)

ERROR: do not use assignment in if condition
#112: FILE: slirp/qtailq.h:96:
+        if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\

WARNING: Block comments use a leading /* on a separate line
#119: FILE: slirp/qtailq.h:103:
+} while (/*CONSTCOND*/0)

WARNING: Block comments use a leading /* on a separate line
#126: FILE: slirp/qtailq.h:110:
+} while (/*CONSTCOND*/0)

WARNING: Block comments use a leading /* on a separate line
#136: FILE: slirp/qtailq.h:120:
+} while (/*CONSTCOND*/0)

WARNING: line over 80 characters
#164: FILE: slirp/qtailq.h:148:
+#define QTAILQ_IN_USE(elm, field)        ((elm)->field.tqe_circ.tql_prev != 
NULL)

WARNING: line over 80 characters
#171: FILE: slirp/qtailq.h:155:
+        ((typeof((elm)->field.tqe_next)) 
QTAILQ_LINK_PREV((elm)->field.tqe_circ))

WARNING: line over 80 characters
#202: FILE: slirp/qtailq.h:186:
+#define QTAILQ_RAW_INSERT_TAIL(head, elm, entry) do {                          
 \

WARNING: line over 80 characters
#203: FILE: slirp/qtailq.h:187:
+        *QTAILQ_RAW_NEXT(elm, entry) = NULL;                                   
 \

WARNING: line over 80 characters
#204: FILE: slirp/qtailq.h:188:
+        QTAILQ_RAW_TQE_CIRC(elm, entry)->tql_prev = 
QTAILQ_RAW_TQH_CIRC(head)->tql_prev; \

WARNING: line over 80 characters
#205: FILE: slirp/qtailq.h:189:
+        QTAILQ_RAW_TQH_CIRC(head)->tql_prev->tql_next = (elm);                 
 \

WARNING: line over 80 characters
#206: FILE: slirp/qtailq.h:190:
+        QTAILQ_RAW_TQH_CIRC(head)->tql_prev = QTAILQ_RAW_TQE_CIRC(elm, entry); 
 \

WARNING: Block comments use a leading /* on a separate line
#207: FILE: slirp/qtailq.h:191:
+} while (/*CONSTCOND*/0)

total: 2 errors, 19 warnings, 202 lines checked

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

23/32 Checking commit 114294c71eca (slirp: replace QEMU_BUILD_BUG_ON with 
G_STATIC_ASSERT)
24/32 Checking commit ba4a673af8ae (slirp: Move g_spawn_async_with_fds_qemu 
compatibility to slirp/)
25/32 Checking commit c862dcd06b2f (slirp: replace remaining qemu headers 
dependency)
26/32 Checking commit 0767ffe68b02 (slirp: prefer c99 types over BSD kind)
ERROR: code indent should never use tabs
#60: FILE: slirp/ip_icmp.h:47:
+^Iuint8_t^Iicmp_type;^I^I/* type of message, see below */$

ERROR: code indent should never use tabs
#61: FILE: slirp/ip_icmp.h:48:
+^Iuint8_t^Iicmp_code;^I^I/* type sub code */$

WARNING: line over 80 characters
#62: FILE: slirp/ip_icmp.h:49:
+       uint16_t        icmp_cksum;             /* ones complement cksum of 
struct */

ERROR: code indent should never use tabs
#62: FILE: slirp/ip_icmp.h:49:
+^Iuint16_t^Iicmp_cksum;^I^I/* ones complement cksum of struct */$

ERROR: code indent should never use tabs
#65: FILE: slirp/ip_icmp.h:51:
+^I^Iuint8_t ih_pptr;^I^I^I/* ICMP_PARAMPROB */$

ERROR: code indent should never use tabs
#70: FILE: slirp/ip_icmp.h:54:
+^I^I^Iuint16_t^Iicd_id;$

ERROR: code indent should never use tabs
#71: FILE: slirp/ip_icmp.h:55:
+^I^I^Iuint16_t^Iicd_seq;$

ERROR: code indent should never use tabs
#79: FILE: slirp/ip_icmp.h:61:
+^I^I^Iuint16_t ipm_void;$

ERROR: code indent should never use tabs
#80: FILE: slirp/ip_icmp.h:62:
+^I^I^Iuint16_t ipm_nextmtu;$

ERROR: code indent should never use tabs
#102: FILE: slirp/ip_input.c:461:
+^Iregister char *opts;$

ERROR: code indent should never use tabs
#107: FILE: slirp/ip_input.c:465:
+^Iopts = (char *)(ip + 1);$

ERROR: code indent should never use tabs
#133: FILE: slirp/mbuf.h:88:
+^Ichar *m_data;^I^I^I/* Current location of data */$

ERROR: space prohibited before that close parenthesis ')'
#167: FILE: slirp/slirp.c:95:
+        printf("GetNetworkParams failed. ret = %08x\n", (unsigned)ret );

ERROR: code indent should never use tabs
#231: FILE: slirp/socket.c:509:
+^I    uint8_t code=ICMP_UNREACH_PORT;$

ERROR: spaces required around that '=' (ctx:VxV)
#231: FILE: slirp/socket.c:509:
+           uint8_t code=ICMP_UNREACH_PORT;
                        ^

ERROR: code indent should never use tabs
#255: FILE: slirp/socket.h:64:
+  unsigned^Iso_expire;^I^I/* When the socket will expire */$

ERROR: "foo * bar" should be "foo *bar"
#264: FILE: slirp/socket.h:147:
+struct socket * tcp_listen(Slirp *, uint32_t, unsigned, uint32_t, unsigned,

ERROR: code indent should never use tabs
#286: FILE: slirp/tcp_input.c:200:
+^Ichar *optp = NULL;$

ERROR: code indent should never use tabs
#295: FILE: slirp/tcp_input.c:208:
+^Iuint32_t tiwin;$

ERROR: code indent should never use tabs
#304: FILE: slirp/tcp_input.c:330:
+^I  optp = mtod(m, char *) + sizeof (struct tcpiphdr);$

ERROR: space prohibited between function name and open parenthesis '('
#304: FILE: slirp/tcp_input.c:330:
+         optp = mtod(m, char *) + sizeof (struct tcpiphdr);

ERROR: code indent should never use tabs
#313: FILE: slirp/tcp_input.c:472:
+^I^Itcp_dooptions(tp, (uint8_t *)optp, optlen, ti);$

ERROR: code indent should never use tabs
#322: FILE: slirp/tcp_input.c:727:
+^I    tcp_dooptions(tp, (uint8_t *)optp, optlen, ti);$

ERROR: code indent should never use tabs
#331: FILE: slirp/tcp_input.c:1042:
+^I^I^I^I^Iunsigned win =$

ERROR: code indent should never use tabs
#341: FILE: slirp/tcp_input.c:1111:
+^I^I  register unsigned cw = tp->snd_cwnd;$

ERROR: code indent should never use tabs
#342: FILE: slirp/tcp_input.c:1112:
+^I^I  register unsigned incr = tp->t_maxseg;$

ERROR: code indent should never use tabs
#382: FILE: slirp/tcp_output.c:66:
+^Iuint8_t opt[MAX_TCPOPTLEN];$

ERROR: code indent should never use tabs
#391: FILE: slirp/tcp_output.c:274:
+^I^I^Imemcpy((char *)(opt + 2), (char *)&mss, sizeof(mss));$

ERROR: code indent should never use tabs
#400: FILE: slirp/tcp_output.c:304:
+^I^Isbcopy(&so->so_snd, off, (int) len, mtod(m, char *) + hdrlen);$

ERROR: code indent should never use tabs
#409: FILE: slirp/tcp_output.c:327:
+^Imemcpy((char *)ti, &tp->t_template, sizeof (struct tcpiphdr));$

ERROR: space prohibited between function name and open parenthesis '('
#409: FILE: slirp/tcp_output.c:327:
+       memcpy((char *)ti, &tp->t_template, sizeof (struct tcpiphdr));

ERROR: code indent should never use tabs
#418: FILE: slirp/tcp_output.c:356:
+^I^Imemcpy((char *)(ti + 1), (char *)opt, optlen);$

ERROR: code indent should never use tabs
#431: FILE: slirp/tcp_subr.c:166:
+^I^Im->m_data = (char *)ti;$

ERROR: code indent should never use tabs
#440: FILE: slirp/tcp_subr.c:185:
+^Iti->ti_len = htons((uint16_t)(sizeof (struct tcphdr) + tlen));$

ERROR: space prohibited between function name and open parenthesis '('
#440: FILE: slirp/tcp_subr.c:185:
+       ti->ti_len = htons((uint16_t)(sizeof (struct tcphdr) + tlen));

ERROR: code indent should never use tabs
#449: FILE: slirp/tcp_subr.c:616:
+^Iunsigned n1, n2, n3, n4, n5, n6;$

ERROR: code indent should never use tabs
#453: FILE: slirp/tcp_subr.c:619:
+^Iunsigned lport;$

ERROR: code indent should never use tabs
#462: FILE: slirp/tcp_subr.c:856:
+^I^I^Iuint16_t p;$

ERROR: code indent should never use tabs
#472: FILE: slirp/tcp_subr.c:912:
+^I^I^I^Ilport = (((uint8_t*)bptr)[0] << 8)$

ERROR: "(foo*)" should be "(foo *)"
#472: FILE: slirp/tcp_subr.c:912:
+                               lport = (((uint8_t*)bptr)[0] << 8)

ERROR: code indent should never use tabs
#473: FILE: slirp/tcp_subr.c:913:
+^I^I^I^I+ ((uint8_t *)bptr)[1];$

ERROR: code indent should never use tabs
#483: FILE: slirp/tcp_subr.c:931:
+^I^I^I^I*(uint8_t *)bptr++ = (p >> 8) & 0xff;$

WARNING: line over 80 characters
#497: FILE: slirp/tcp_timer.c:235:
+                unsigned win = MIN(tp->snd_wnd, tp->snd_cwnd) / 2 / 
tp->t_maxseg;

ERROR: code indent should never use tabs
#510: FILE: slirp/tcp_var.h:50:
+^Iuint16_t^It_maxseg;^I^I/* maximum segment size */$

ERROR: code indent should never use tabs
#513: FILE: slirp/tcp_var.h:52:
+^Iuint16_t^It_flags;$

ERROR: code indent should never use tabs
#522: FILE: slirp/tcp_var.h:108:
+^Iuint16_t^It_rttmin;^I^I/* minimum rtt allowed */$

ERROR: code indent should never use tabs
#534: FILE: slirp/tcp_var.h:119:
+^Iuint8_t^Isnd_scale;^I^I/* window scaling for send window */$

ERROR: code indent should never use tabs
#535: FILE: slirp/tcp_var.h:120:
+^Iuint8_t^Ircv_scale;^I^I/* window scaling for recv window */$

ERROR: code indent should never use tabs
#536: FILE: slirp/tcp_var.h:121:
+^Iuint8_t^Irequest_r_scale;^I/* pending window scaling */$

ERROR: code indent should never use tabs
#537: FILE: slirp/tcp_var.h:122:
+^Iuint8_t^Irequested_s_scale;$

ERROR: code indent should never use tabs
#550: FILE: slirp/udp.c:95:
+^Iuh = (struct udphdr *)((char *)ip + iphlen);$

ERROR: "foo * bar" should be "foo *bar"
#574: FILE: slirp/udp.h:81:
+struct socket * udp_listen(Slirp *, uint32_t, unsigned, uint32_t, unsigned,

ERROR: externs should be avoided in .c files
#587: FILE: util/osdep.c:32:
+extern int madvise(char *, size_t, int);

total: 51 errors, 2 warnings, 455 lines checked

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

27/32 Checking commit 19f0fbff0be6 (slirp: improve send_packet() callback)
28/32 Checking commit 766080e20c1f (slirp: replace global polling with 
per-instance & notifier)
ERROR: spaces required around that '/' (ctx:VxV)
#237: FILE: slirp/slirp.c:471:
+            (so->so_snd.sb_cc < (so->so_snd.sb_datalen/2))) {
                                                       ^

WARNING: Block comments use a leading /* on a separate line
#565: FILE: slirp/slirp.c:611:
+                    /* Socket error might have resulted in the socket being

WARNING: Block comments use a trailing */ on a separate line
#566: FILE: slirp/slirp.c:612:
+                     * removed, do not try to do anything more with it. */

WARNING: Block comments use a leading /* on a separate line
#594: FILE: slirp/slirp.c:634:
+                    /* Socket error might have resulted in the socket being

WARNING: Block comments use a trailing */ on a separate line
#595: FILE: slirp/slirp.c:635:
+                     * removed, do not try to do anything more with it. */

WARNING: Block comments use a leading /* on a separate line
#653: FILE: slirp/slirp.c:675:
+                        /* Call tcp_output in case we need to send a window

WARNING: Block comments use a trailing */ on a separate line
#655: FILE: slirp/slirp.c:677:
+                         * until it sends a window probe. */

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#817: 
deleted file mode 100644

total: 1 errors, 7 warnings, 829 lines checked

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

29/32 Checking commit 25ed9a94b9c2 (slirp: remove slirp_instances list)
30/32 Checking commit 619e3c22a900 (slirp: use polling callbacks, drop glib 
requirement)
31/32 Checking commit def44b9e1f42 (slirp: pass opaque to all callbacks)
WARNING: line over 80 characters
#95: FILE: slirp/dhcpv6.c:62:
+            slirp->cb->guest_error("Guest sent bad DHCPv6 packet!", 
slirp->opaque);

WARNING: line over 80 characters
#131: FILE: slirp/ip6_icmp.c:28:
+    slirp->ra_timer = slirp->cb->timer_new(ra_timer_handler, slirp, 
slirp->opaque);

WARNING: line over 80 characters
#276: FILE: slirp/slirp.c:888:
+            ifm->expiration_date = slirp->cb->clock_get_ns(slirp->opaque) + 
1000000000ULL;

ERROR: code indent should never use tabs
#310: FILE: slirp/tcp_subr.c:339:
+^Iso->slirp->cb->unregister_poll_fd(so->s, so->slirp->opaque);$

ERROR: code indent should never use tabs
#350: FILE: slirp/udp.c:294:
+^Iso->slirp->cb->unregister_poll_fd(so->s, so->slirp->opaque);$

total: 2 errors, 3 warnings, 273 lines checked

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

32/32 Checking commit 33314ca9936c (slirp: API is extern C)
WARNING: architecture specific defines should be avoided
#21: FILE: slirp/libslirp.h:15:
+#ifdef __cplusplus

WARNING: architecture specific defines should be avoided
#33: FILE: slirp/libslirp.h:103:
+#ifdef __cplusplus

total: 0 errors, 2 warnings, 19 lines checked

Patch 32/32 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/address@hidden/testing.checkpatch/?type=message.
---
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]