Message ID | 20190306235850.30110-1-samuel.thibault@ens-lyon.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Patchew URL: https://patchew.org/QEMU/20190306235850.30110-1-samuel.thibault@ens-lyon.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20190306235850.30110-1-samuel.thibault@ens-lyon.org Subject: [Qemu-devel] [PULL 00/12] slirp updates === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 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 * [new tag] patchew/20190306235850.30110-1-samuel.thibault@ens-lyon.org -> patchew/20190306235850.30110-1-samuel.thibault@ens-lyon.org Switched to a new branch 'test' 628736a3af slirp: remove QEMU Makefile.objs 79445c6ed6 build-sys: link with slirp as an external project 944c7440ad slirp: add a standalone Makefile 60c072d3bd slirp: move sources to src/ subdirectory e416d0a345 slirp: use "slirp_" prefix for inet_aton() win32 implementation efd01958b8 slirp: use libslirp migration code 37616f5620 slirp: adapt a subset of QEMU vmstate code 21b1998b5a slirp: Mark pieces missing IPv6 support 3d70b5116f slirp: fix big/little endian conversion in ident protocol c5059b2fcb slirp: check sscanf result when emulating ident c69a201a41 slirp: check for ioctlsocket error and 0-length udp payload. 7b03b19942 slirp: Fix build with gcc 9 === OUTPUT BEGIN === 1/12 Checking commit 7b03b1994240 (slirp: Fix build with gcc 9) 2/12 Checking commit c69a201a416f (slirp: check for ioctlsocket error and 0-length udp payload.) ERROR: code indent should never use tabs #25: FILE: slirp/socket.c:532: +^I if (ioctlsocket(so->s, FIONREAD, &n) != 0) {$ ERROR: suspect code indent for conditional statements (10, 14) #25: FILE: slirp/socket.c:532: + if (ioctlsocket(so->s, FIONREAD, &n) != 0) { + DEBUG_MISC(" ioctlsocket errno = %d-%s\n", ERROR: code indent should never use tabs #26: FILE: slirp/socket.c:533: +^I DEBUG_MISC(" ioctlsocket errno = %d-%s\n",$ ERROR: code indent should never use tabs #27: FILE: slirp/socket.c:534: +^I^I^I errno,strerror(errno));$ ERROR: space required after that ',' (ctx:VxV) #27: FILE: slirp/socket.c:534: + errno,strerror(errno)); ^ ERROR: code indent should never use tabs #28: FILE: slirp/socket.c:535: +^I return;$ ERROR: code indent should never use tabs #29: FILE: slirp/socket.c:536: +^I }$ ERROR: code indent should never use tabs #30: FILE: slirp/socket.c:537: +^I if (n == 0) {$ ERROR: suspect code indent for conditional statements (10, 14) #30: FILE: slirp/socket.c:537: + if (n == 0) { + return; ERROR: code indent should never use tabs #31: FILE: slirp/socket.c:538: +^I return;$ ERROR: code indent should never use tabs #32: FILE: slirp/socket.c:539: +^I }$ total: 11 errors, 0 warnings, 22 lines checked Patch 2/12 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 3/12 Checking commit c5059b2fcb5b (slirp: check sscanf result when emulating ident) WARNING: line over 80 characters #27: FILE: slirp/tcp_subr.c:667: + so_rcv->sb_cc = snprintf(so_rcv->sb_data, ERROR: code indent should never use tabs #27: FILE: slirp/tcp_subr.c:667: +^I^I^I^I^Iso_rcv->sb_cc = snprintf(so_rcv->sb_data,$ WARNING: line over 80 characters #28: FILE: slirp/tcp_subr.c:668: + so_rcv->sb_datalen, ERROR: code indent should never use tabs #28: FILE: slirp/tcp_subr.c:668: +^I^I^I^I^I^I^I^I so_rcv->sb_datalen,$ WARNING: line over 80 characters #29: FILE: slirp/tcp_subr.c:669: + "%d,%d\r\n", n1, n2); ERROR: code indent should never use tabs #29: FILE: slirp/tcp_subr.c:669: +^I^I^I^I^I^I^I^I "%d,%d\r\n", n1, n2);$ ERROR: code indent should never use tabs #30: FILE: slirp/tcp_subr.c:670: +^I^I^I^I^Iso_rcv->sb_rptr = so_rcv->sb_data;$ WARNING: line over 80 characters #31: FILE: slirp/tcp_subr.c:671: + so_rcv->sb_wptr = so_rcv->sb_data + so_rcv->sb_cc; ERROR: code indent should never use tabs #31: FILE: slirp/tcp_subr.c:671: +^I^I^I^I^Iso_rcv->sb_wptr = so_rcv->sb_data + so_rcv->sb_cc;$ total: 5 errors, 4 warnings, 17 lines checked Patch 3/12 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 4/12 Checking commit 3d70b5116f95 (slirp: fix big/little endian conversion in ident protocol) ERROR: suspect code indent for conditional statements (56, 59) #19: FILE: slirp/tcp_subr.c:661: if (getsockname(tmpso->s, [...] + n2 = addr.sin_port; ERROR: code indent should never use tabs #22: FILE: slirp/tcp_subr.c:663: +^I^I^I^I^I^I^I n2 = addr.sin_port;$ ERROR: code indent should never use tabs #26: FILE: slirp/tcp_subr.c:667: +^I^I^I^I^INTOHS(n1);$ ERROR: code indent should never use tabs #27: FILE: slirp/tcp_subr.c:668: +^I^I^I^I^INTOHS(n2);$ total: 4 errors, 0 warnings, 13 lines checked Patch 4/12 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 5/12 Checking commit 21b1998b5a02 (slirp: Mark pieces missing IPv6 support) ERROR: suspect code indent for conditional statements (8, 10) #106: FILE: slirp/tcp_input.c:390: if (so == NULL) { + /* TODO: IPv6 */ total: 1 errors, 0 warnings, 99 lines checked Patch 5/12 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 6/12 Checking commit 37616f56208b (slirp: adapt a subset of QEMU vmstate code) WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #52: new file mode 100644 WARNING: line over 80 characters #271: FILE: slirp/vmstate.c:50: +static int get_uint8(SlirpIStream *f, void *pv, size_t size, const VMStateField *field) WARNING: line over 80 characters #278: FILE: slirp/vmstate.c:57: +static int put_uint8(SlirpOStream *f, void *pv, size_t size, const VMStateField *field) WARNING: line over 80 characters #341: FILE: slirp/vmstate.c:120: +static int get_int16(SlirpIStream *f, void *pv, size_t size, const VMStateField *field) WARNING: line over 80 characters #348: FILE: slirp/vmstate.c:127: +static int put_int16(SlirpOStream *f, void *pv, size_t size, const VMStateField *field) WARNING: line over 80 characters #363: FILE: slirp/vmstate.c:142: +static int get_int32(SlirpIStream *f, void *pv, size_t size, const VMStateField *field) WARNING: line over 80 characters #370: FILE: slirp/vmstate.c:149: +static int put_int32(SlirpOStream *f, void *pv, size_t size, const VMStateField *field) WARNING: Block comments use a leading /* on a separate line #383: FILE: slirp/vmstate.c:162: +/* vmstate_info_tmp, see VMSTATE_WITH_TMP, the idea is that we allocate WARNING: line over 80 characters #389: FILE: slirp/vmstate.c:168: +static int get_tmp(SlirpIStream *f, void *pv, size_t size, const VMStateField *field) WARNING: line over 80 characters #403: FILE: slirp/vmstate.c:182: +static int put_tmp(SlirpOStream *f, void *pv, size_t size, const VMStateField *field) WARNING: line over 80 characters #521: FILE: slirp/vmstate.c:300: + ret = slirp_vmstate_info_nullptr.put(f, curr_elem, size, NULL); WARNING: line over 80 characters #607: FILE: slirp/vmstate.c:386: + ret = slirp_vmstate_info_nullptr.get(f, curr_elem, size, NULL); WARNING: Block comments use a leading /* on a separate line #687: FILE: slirp/vmstate.h:47: +/* VMStateInfo allows customized migration of objects that don't fit in WARNING: line over 80 characters #696: FILE: slirp/vmstate.h:56: + int (*get)(SlirpIStream *f, void *pv, size_t size, const VMStateField *field); WARNING: line over 80 characters #697: FILE: slirp/vmstate.h:57: + int (*put)(SlirpOStream *f, void *pv, size_t size, const VMStateField *field); WARNING: Block comments use a leading /* on a separate line #704: FILE: slirp/vmstate.h:64: + /* The struct member at opaque + VMStateField.offset is a pointer WARNING: Block comments use a trailing */ on a separate line #710: FILE: slirp/vmstate.h:70: + * those. */ WARNING: Block comments use a leading /* on a separate line #713: FILE: slirp/vmstate.h:73: + /* The field is an array of fixed size. VMStateField.num contains WARNING: Block comments use a trailing */ on a separate line #720: FILE: slirp/vmstate.h:80: + * be combined with VMS_VARRAY*. */ WARNING: Block comments use a leading /* on a separate line #723: FILE: slirp/vmstate.h:83: + /* The field is itself a struct, containing one or more WARNING: Block comments use a trailing */ on a separate line #726: FILE: slirp/vmstate.h:86: + * array entry. */ WARNING: Block comments use a leading /* on a separate line #729: FILE: slirp/vmstate.h:89: + /* The field is an array of variable size. The int32_t at opaque + WARNING: Block comments use a trailing */ on a separate line #733: FILE: slirp/vmstate.h:93: + * VMS_VARRAY*. */ WARNING: Block comments use a leading /* on a separate line #739: FILE: slirp/vmstate.h:99: + /* The field is a (fixed-size or variable-size) array of pointers WARNING: Block comments use a trailing */ on a separate line #742: FILE: slirp/vmstate.h:102: + * VMS_VARRAY*; these need to be set explicitly. */ WARNING: Block comments use a leading /* on a separate line #745: FILE: slirp/vmstate.h:105: + /* The field is an array of variable size. The uint16_t at opaque WARNING: Block comments use a trailing */ on a separate line #749: FILE: slirp/vmstate.h:109: + * combined with VMS_ARRAY or any other VMS_VARRAY*. */ WARNING: Block comments use a leading /* on a separate line #752: FILE: slirp/vmstate.h:112: + /* The size of the individual entries (a single array entry if WARNING: Block comments use a trailing */ on a separate line #757: FILE: slirp/vmstate.h:117: + * the size of each (and every) entry. */ WARNING: Block comments use a leading /* on a separate line #760: FILE: slirp/vmstate.h:120: + /* Multiply the entry size given by the int32_t at opaque + WARNING: Block comments use a trailing */ on a separate line #763: FILE: slirp/vmstate.h:123: + * allocated. Only valid in combination with VMS_VBUFFER. */ WARNING: Block comments use a leading /* on a separate line #766: FILE: slirp/vmstate.h:126: + /* The field is an array of variable size. The uint8_t at opaque + WARNING: Block comments use a trailing */ on a separate line #770: FILE: slirp/vmstate.h:130: + * combined with VMS_ARRAY or any other VMS_VARRAY*. */ WARNING: Block comments use a leading /* on a separate line #773: FILE: slirp/vmstate.h:133: + /* The field is an array of variable size. The uint32_t at opaque WARNING: Block comments use a trailing */ on a separate line #777: FILE: slirp/vmstate.h:137: + * combined with VMS_ARRAY or any other VMS_VARRAY*. */ WARNING: Block comments use a leading /* on a separate line #780: FILE: slirp/vmstate.h:140: + /* Fail loading the serialised VM state if this field is missing WARNING: Block comments use a trailing */ on a separate line #781: FILE: slirp/vmstate.h:141: + * from the input. */ WARNING: Block comments use a leading /* on a separate line #784: FILE: slirp/vmstate.h:144: + /* When loading serialised VM state, allocate memory for the WARNING: Block comments use a trailing */ on a separate line #788: FILE: slirp/vmstate.h:148: + * cause the individual entries to be allocated. */ WARNING: Block comments use a leading /* on a separate line #791: FILE: slirp/vmstate.h:151: + /* Multiply the number of entries given by the integer at opaque + WARNING: Block comments use a trailing */ on a separate line #794: FILE: slirp/vmstate.h:154: + * combination with one of VMS_VARRAY*. */ WARNING: Block comments use a leading /* on a separate line #797: FILE: slirp/vmstate.h:157: + /* A structure field that is like VMS_STRUCT, but uses WARNING: Block comments use a trailing */ on a separate line #799: FILE: slirp/vmstate.h:159: + * structure we are referencing to use. */ ERROR: "(foo*)" should be "(foo *)" #842: FILE: slirp/vmstate.h:202: +#define type_check_array(t1,t2,n) ((t1(*)[n])0 - (t2*)0) ERROR: space required after that ',' (ctx:VxV) #842: FILE: slirp/vmstate.h:202: +#define type_check_array(t1,t2,n) ((t1(*)[n])0 - (t2*)0) ^ ERROR: space required after that ',' (ctx:VxV) #842: FILE: slirp/vmstate.h:202: +#define type_check_array(t1,t2,n) ((t1(*)[n])0 - (t2*)0) ^ ERROR: "(foo**)" should be "(foo **)" #843: FILE: slirp/vmstate.h:203: +#define type_check_pointer(t1,t2) ((t1**)0 - (t2*)0) ERROR: space required after that ',' (ctx:VxV) #843: FILE: slirp/vmstate.h:203: +#define type_check_pointer(t1,t2) ((t1**)0 - (t2*)0) ^ ERROR: "(foo*)" should be "(foo *)" #845: FILE: slirp/vmstate.h:205: +#define type_check(t1,t2) ((t1*)0 - (t2*)0) ERROR: space required after that ',' (ctx:VxV) #845: FILE: slirp/vmstate.h:205: +#define type_check(t1,t2) ((t1*)0 - (t2*)0) ^ WARNING: Block comments use a leading /* on a separate line #863: FILE: slirp/vmstate.h:223: +/* In the macros below, if there is a _version, that means the macro's ERROR: spaces required around that '|' (ctx:VxV) #917: FILE: slirp/vmstate.h:277: + .flags = VMS_STRUCT|VMS_POINTER, \ ^ WARNING: line over 80 characters #921: FILE: slirp/vmstate.h:281: +#define VMSTATE_STRUCT_ARRAY_TEST(_field, _state, _num, _test, _version, _vmsd, _type) { \ ERROR: spaces required around that '|' (ctx:VxV) #928: FILE: slirp/vmstate.h:288: + .flags = VMS_STRUCT|VMS_ARRAY, \ ^ WARNING: line over 80 characters #932: FILE: slirp/vmstate.h:292: +#define VMSTATE_STATIC_BUFFER(_field, _state, _version, _test, _start, _size) { \ ERROR: spaces required around that '|' (ctx:VxV) #948: FILE: slirp/vmstate.h:308: + .flags = VMS_VBUFFER|VMS_POINTER, \ ^ WARNING: Block comments use a leading /* on a separate line #960: FILE: slirp/vmstate.h:320: +/* Allocate a temporary of type 'tmp_type', set tmp->parent to _state total: 10 errors, 47 warnings, 983 lines checked Patch 6/12 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 7/12 Checking commit efd01958b8fe (slirp: use libslirp migration code) WARNING: line over 80 characters #267: FILE: slirp/state.c:361: + ret = slirp_vmstate_load_state(&f, &vmstate_slirp_socket, so, version_id); total: 0 errors, 1 warnings, 233 lines checked Patch 7/12 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 8/12 Checking commit e416d0a345d9 (slirp: use "slirp_" prefix for inet_aton() win32 implementation) 9/12 Checking commit 60c072d3bd62 (slirp: move sources to src/ subdirectory) WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #102: rename from slirp/arp_table.c total: 0 errors, 1 warnings, 94 lines checked Patch 9/12 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 10/12 Checking commit 944c7440adcb (slirp: add a standalone Makefile) WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #17: new file mode 100644 total: 0 errors, 1 warnings, 47 lines checked Patch 10/12 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 11/12 Checking commit 79445c6ed614 (build-sys: link with slirp as an external project) 12/12 Checking commit 628736a3afc6 (slirp: remove QEMU Makefile.objs) WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #15: deleted file mode 100644 total: 0 errors, 1 warnings, 0 lines checked Patch 12/12 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/20190306235850.30110-1-samuel.thibault@ens-lyon.org/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
On Wed, 6 Mar 2019 at 23:59, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote: > > The following changes since commit 32694e98b8d7a246345448a8f707d2e11d6c65e2: > > Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2019-03-06 18:52:19 +0000) > > are available in the Git repository at: > > https://people.debian.org/~sthibault/qemu.git tags/samuel-thibault > > for you to fetch changes up to dd9eff6c839db3996c157f0a6a4e18f95683e58c: > > slirp: remove QEMU Makefile.objs (2019-03-07 00:12:34 +0100) > > ---------------------------------------------------------------- Hi; this fails to build on FreeBSD, I'm afraid: In file included from /var/tmp/qemu-test.Sn5gQz/slirp/src/stream.c:24: In file included from /var/tmp/qemu-test.Sn5gQz/slirp/src/stream.h:4: /var/tmp/qemu-test.Sn5gQz/slirp/src/libslirp.h:29:19: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] typedef ssize_t (*SlirpReadCb)(void *buf, size_t len, void *opaque); ^ /var/tmp/qemu-test.Sn5gQz/slirp/src/libslirp.h:29:9: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] typedef ssize_t (*SlirpReadCb)(void *buf, size_t len, void *opaque); ~~~~~~~ ^ /var/tmp/qemu-test.Sn5gQz/slirp/src/libslirp.h:29:17: error: function cannot return function type 'int (void *, size_t, void *)' (aka 'int (void *, unsigned long, void *)') typedef ssize_t (*SlirpReadCb)(void *buf, size_t len, void *opaque); ^ /var/tmp/qemu-test.Sn5gQz/slirp/src/libslirp.h:30:32: error: function cannot return function type 'ssize_t' (aka 'int (int *)') typedef ssize_t (*SlirpWriteCb)(const void *buf, size_t len, void *opaque); ^ /var/tmp/qemu-test.Sn5gQz/slirp/src/libslirp.h:108:22: error: unknown type name 'SlirpReadCb' SlirpReadCb read_cb, void *opaque); ^ In file included from /var/tmp/qemu-test.Sn5gQz/slirp/src/stream.c:24: /var/tmp/qemu-test.Sn5gQz/slirp/src/stream.h:7:5: error: unknown type name 'SlirpReadCb' SlirpReadCb read_cb; ^ 2 warnings and 4 errors generated. I think this is a missing #include of <sys/types.h> which is where ssize_t comes from -- on the other OSes it likely gets dragged in by default. thanks -- PMM
Peter Maydell, le jeu. 07 mars 2019 11:27:38 +0000, a ecrit: > Hi; this fails to build on FreeBSD, I'm afraid: > > /var/tmp/qemu-test.Sn5gQz/slirp/src/libslirp.h:29:19: warning: type > specifier missing, defaults to 'int' [-Wimplicit-int] > typedef ssize_t (*SlirpReadCb)(void *buf, size_t len, void *opaque); > ^ > I think this is a missing #include of <sys/types.h> which is where > ssize_t comes from -- on the other OSes it likely gets dragged in > by default. That's probably it indeed. I have resubmitted the series with it. Samuel