qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 00/27] slirp: make it again a standalone project


From: no-reply
Subject: Re: [Qemu-devel] [PATCH 00/27] slirp: make it again a standalone project (part 2)
Date: Thu, 31 Jan 2019 09:47:55 -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] [PATCH 00/27] slirp: make it again a standalone project 
(part 2)
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
Switched to a new branch 'test'
2cf761b5c1 slirp: API is extern C
bc95af56e1 slirp: pass opaque to all callbacks
657ff52f2c slirp: use polling callbacks, drop glib requirement
9a4ae85643 slirp: remove slirp_instances list
d553802b2c slirp: replace global polling with per-instance & notifier
52b7c50d1b slirp: improve send_packet() callback
351b772a02 slirp: prefer c99 types over BSD kind
ddeb208a22 slirp: replace remaining qemu headers dependency
d2bad6f3a1 slirp: replace qemu qtailq with slirp own copy
848302e24d slirp: replace net/eth.h inclusion with own defines
deb2e7b8ad slirp: remove now useless QEMU headers inclusions
cfead77e82 slirp: remove qemu timer.h dependency
8261250276 slirp: add slirp own version of pstrcpy
53843ba7f1 slirp: improve windows headers inclusion
842e6e37a9 slirp: do not include qemu headers in libslirp.h public API header
af5f9f0da6 slirp: move QEMU state saving to a separate unit
9539c9254f slirp: replace qemu_notify_event() with a callback
54bfafb18a slirp: add unregister_poll_fd() callback
86bf6c954f slirp: replace qemu_set_nonblock()
e7e9665c70 slirp: replace most qemu socket utilities with slirp own version
a3688a158d slirp: replace QEMU_PACKED with SLIRP_PACKED
9a067d1b28 slirp: replace trace functions with DEBUG calls
eb6a11a0c4 slirp: add callbacks for timer
36bf852e39 net/slirp: fix leaks on forwaring rule registration error
15bd318ea2 net/slirp: free forwarding rules on cleanup
b3ee7a6d08 net/slirp: simplify checking for cmd: prefix
d13d4d7734 slirp: generalize guestfwd with a callback based approach

=== OUTPUT BEGIN ===
1/27 Checking commit d13d4d77341f (slirp: generalize guestfwd with a callback 
based approach)
ERROR: code indent should never use tabs
#147: FILE: slirp/misc.h:14:
+^ISlirpWriteCb write_cb;$

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

total: 2 errors, 0 warnings, 226 lines checked

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

2/27 Checking commit b3ee7a6d081b (net/slirp: simplify checking for cmd: prefix)
3/27 Checking commit 15bd318ea20c (net/slirp: free forwarding rules on cleanup)
4/27 Checking commit 36bf852e3922 (net/slirp: fix leaks on forwaring rule 
registration error)
5/27 Checking commit eb6a11a0c41a (slirp: add callbacks for timer)
6/27 Checking commit 9a067d1b28a9 (slirp: replace trace functions with DEBUG 
calls)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#99: 
deleted file mode 100644

total: 0 errors, 1 warnings, 62 lines checked

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

total: 0 errors, 1 warnings, 180 lines checked

Patch 7/27 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/27 Checking commit e7e9665c706f (slirp: replace most qemu socket utilities 
with slirp own version)
ERROR: code indent should never use tabs
#128: 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)
#128: FILE: slirp/socket.c:190:
+       nn = slirp_recv(so->s, iov[0].iov_base, iov[0].iov_len,0);
                                                              ^

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

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

ERROR: space required after that ',' (ctx:VxV)
#146: 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
#155: FILE: slirp/socket.c:557:
+^I  slirp_ioctlsocket(so->s, FIONREAD, &n);$

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

WARNING: Block comments use a leading /* on a separate line
#391: 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
#392: FILE: slirp/util.c:100:
+          * to check both EWOULDBLOCK and EAGAIN */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

total: 51 errors, 7 warnings, 474 lines checked

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

9/27 Checking commit 86bf6c954f1a (slirp: replace qemu_set_nonblock())
10/27 Checking commit 54bfafb18a21 (slirp: add unregister_poll_fd() callback)
ERROR: code indent should never use tabs
#86: FILE: slirp/tcp_subr.c:340:
+^Iso->slirp->cb->unregister_poll_fd(so->s);$

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

total: 2 errors, 0 warnings, 63 lines checked

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

11/27 Checking commit 9539c9254f16 (slirp: replace qemu_notify_event() with a 
callback)
ERROR: code indent should never use tabs
#114: FILE: slirp/tcp_input.c:509:
+^I^I^I^Isodrop(so, acked);$

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

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

total: 3 errors, 0 warnings, 79 lines checked

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

12/27 Checking commit af5f9f0da68d (slirp: move QEMU state saving to a separate 
unit)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#460: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#552: 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
#650: 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
#720: FILE: slirp/state.c:256:
+#if 0

total: 1 errors, 3 warnings, 480 lines checked

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

13/27 Checking commit 842e6e37a981 (slirp: do not include qemu headers in 
libslirp.h public API header)
14/27 Checking commit 53843ba7f165 (slirp: improve windows headers inclusion)
15/27 Checking commit 8261250276ba (slirp: add slirp own version of pstrcpy)
WARNING: line over 80 characters
#36: 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
#54: FILE: slirp/util.c:195:
+    if (buf_size <= 0)
[...]

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

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

total: 3 errors, 1 warnings, 44 lines checked

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

16/27 Checking commit cfead77e8226 (slirp: remove qemu timer.h dependency)
17/27 Checking commit deb2e7b8ade7 (slirp: remove now useless QEMU headers 
inclusions)
18/27 Checking commit 848302e24dee (slirp: replace net/eth.h inclusion with own 
defines)
19/27 Checking commit d2bad6f3a1f5 (slirp: replace qemu qtailq with slirp own 
copy)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#11: 
new file mode 100644

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

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

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

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

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

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

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

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

ERROR: do not use assignment in if condition
#111: 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
#118: FILE: slirp/qtailq.h:103:
+} while (/*CONSTCOND*/0)

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

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

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

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

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

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

WARNING: line over 80 characters
#203: 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
#204: FILE: slirp/qtailq.h:189:
+        QTAILQ_RAW_TQH_CIRC(head)->tql_prev->tql_next = (elm);                 
 \

WARNING: line over 80 characters
#205: 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
#206: FILE: slirp/qtailq.h:191:
+} while (/*CONSTCOND*/0)

total: 2 errors, 19 warnings, 202 lines checked

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

20/27 Checking commit ddeb208a2296 (slirp: replace remaining qemu headers 
dependency)
21/27 Checking commit 351b772a0287 (slirp: prefer c99 types over BSD kind)
ERROR: code indent should never use tabs
#62: FILE: slirp/ip_icmp.h:47:
+^Iuint8_t^Iicmp_type;^I^I/* type of message, see below */$

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ERROR: code indent should never use tabs
#402: 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
#411: FILE: slirp/tcp_output.c:327:
+^Imemcpy((char *)ti, &tp->t_template, sizeof (struct tcpiphdr));$

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

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

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

ERROR: code indent should never use tabs
#442: 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 '('
#442: FILE: slirp/tcp_subr.c:185:
+       ti->ti_len = htons((uint16_t)(sizeof (struct tcphdr) + tlen));

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

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

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

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

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

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

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

WARNING: line over 80 characters
#499: 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
#512: FILE: slirp/tcp_var.h:50:
+^Iuint16_t^It_maxseg;^I^I/* maximum segment size */$

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

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

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

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

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

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

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

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

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

total: 51 errors, 2 warnings, 455 lines checked

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

22/27 Checking commit 52b7c50d1b6f (slirp: improve send_packet() callback)
23/27 Checking commit d553802b2c05 (slirp: replace global polling with 
per-instance & notifier)
ERROR: spaces required around that '/' (ctx:VxV)
#236: 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
#564: FILE: slirp/slirp.c:611:
+                    /* Socket error might have resulted in the socket being

WARNING: Block comments use a trailing */ on a separate line
#565: 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
#593: FILE: slirp/slirp.c:634:
+                    /* Socket error might have resulted in the socket being

WARNING: Block comments use a trailing */ on a separate line
#594: 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
#652: 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
#654: FILE: slirp/slirp.c:677:
+                         * until it sends a window probe. */

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

total: 1 errors, 7 warnings, 829 lines checked

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

24/27 Checking commit 9a4ae85643ca (slirp: remove slirp_instances list)
25/27 Checking commit 657ff52f2c65 (slirp: use polling callbacks, drop glib 
requirement)
26/27 Checking commit bc95af56e11f (slirp: pass opaque to all callbacks)
WARNING: line over 80 characters
#94: FILE: slirp/dhcpv6.c:62:
+            slirp->cb->guest_error("Guest sent bad DHCPv6 packet!", 
slirp->opaque);

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

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

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

ERROR: code indent should never use tabs
#349: 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 26/27 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

27/27 Checking commit 2cf761b5c1da (slirp: API is extern C)
WARNING: architecture specific defines should be avoided
#20: FILE: slirp/libslirp.h:15:
+#ifdef __cplusplus

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

total: 0 errors, 2 warnings, 19 lines checked

Patch 27/27 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]