Hi, Thank you for submitting your patch series. checkpatch.pl has detected that one or more of the patches in this series violate the QEMU coding style.
If you believe this message was sent in error, please ignore it or respond here with an explanation. Otherwise, please correct the coding style issues and resubmit a new version of the patch. For more information about QEMU coding style, see: http://git.qemu.org/?p=qemu.git;a=blob_plain;f=CODING_STYLE;hb=HEAD Here is the output from checkpatch.pl: Subject: netmap backend (revised) ERROR: code indent should never use tabs #144: FILE: net/net.c:622: +^I[NET_CLIENT_OPTIONS_KIND_NETMAP] = net_init_netmap,$ ERROR: code indent should never use tabs #194: FILE: net/qemu-netmap.c:40: +#define ND(fd, ... )^I// debugging$ ERROR: do not use C99 // comments #194: FILE: net/qemu-netmap.c:40: +#define ND(fd, ... ) // debugging ERROR: space prohibited before that close parenthesis ')' #194: FILE: net/qemu-netmap.c:40: +#define ND(fd, ... ) // debugging WARNING: __func__ should be used instead of gcc specific __FUNCTION__ #201: FILE: net/qemu-netmap.c:47: + __FUNCTION__, __LINE__, ##__VA_ARGS__); \ WARNING: braces {} are necessary for all arms of this statement #214: FILE: net/qemu-netmap.c:60: + if (__cnt++ < lps) \ [...] ERROR: code indent should never use tabs #224: FILE: net/qemu-netmap.c:70: + int^I^I^Ifd;$ ERROR: code indent should never use tabs #225: FILE: net/qemu-netmap.c:71: + int^I^I^Imemsize;$ ERROR: code indent should never use tabs #226: FILE: net/qemu-netmap.c:72: + void^I^I*mem;$ ERROR: code indent should never use tabs #227: FILE: net/qemu-netmap.c:73: + struct netmap_if^I*nifp;$ ERROR: code indent should never use tabs #228: FILE: net/qemu-netmap.c:74: + struct netmap_ring^I*rx;$ ERROR: code indent should never use tabs #229: FILE: net/qemu-netmap.c:75: + struct netmap_ring^I*tx;$ ERROR: code indent should never use tabs #230: FILE: net/qemu-netmap.c:76: + char^I^Ifdname[128];^I/* normally /dev/netmap */$ ERROR: code indent should never use tabs #231: FILE: net/qemu-netmap.c:77: + char^I^Iifname[128];^I/* maybe the nmreq here ? */$ ERROR: code indent should never use tabs #235: FILE: net/qemu-netmap.c:81: + NetClientState^Inc;$ ERROR: code indent should never use tabs #236: FILE: net/qemu-netmap.c:82: + struct netmap_state^Ime;$ ERROR: code indent should never use tabs #237: FILE: net/qemu-netmap.c:83: + unsigned int^Iread_poll;$ ERROR: code indent should never use tabs #238: FILE: net/qemu-netmap.c:84: + unsigned int^Iwrite_poll;$ ERROR: do not use C99 // comments #241: FILE: net/qemu-netmap.c:87: +// a fast copy routine only for multiples of 64 bytes, non overlapped. ERROR: code indent should never use tabs #277: FILE: net/qemu-netmap.c:123: +^Ierror_report("Unable to open netmap device '%s'", me->fdname);$ ERROR: code indent should never use tabs #278: FILE: net/qemu-netmap.c:124: +^Ireturn -1;$ ERROR: code indent should never use tabs #286: FILE: net/qemu-netmap.c:132: +^Ierror_report("cannot get info on %s", me->ifname);$ ERROR: code indent should never use tabs #287: FILE: net/qemu-netmap.c:133: +^Igoto error;$ ERROR: code indent should never use tabs #292: FILE: net/qemu-netmap.c:138: +^Ierror_report("Unable to register %s", me->ifname);$ ERROR: code indent should never use tabs #293: FILE: net/qemu-netmap.c:139: +^Igoto error;$ ERROR: code indent should never use tabs #298: FILE: net/qemu-netmap.c:144: +^Ierror_report("Unable to mmap");$ ERROR: code indent should never use tabs #299: FILE: net/qemu-netmap.c:145: +^Ime->mem = NULL;$ ERROR: code indent should never use tabs #300: FILE: net/qemu-netmap.c:146: +^Igoto error;$ ERROR: do not use C99 // comments #313: FILE: net/qemu-netmap.c:159: +// XXX do we need the can-send routine ? ERROR: do not use C99 // comments #343: FILE: net/qemu-netmap.c:189: +// update the read handler ERROR: code indent should never use tabs #347: FILE: net/qemu-netmap.c:193: +^Is->read_poll = enable;$ ERROR: code indent should never use tabs #348: FILE: net/qemu-netmap.c:194: +^Inetmap_update_fd_handler(s);$ ERROR: do not use C99 // comments #352: FILE: net/qemu-netmap.c:198: +// update the write handler ERROR: code indent should never use tabs #356: FILE: net/qemu-netmap.c:202: +^Is->write_poll = enable;$ ERROR: code indent should never use tabs #357: FILE: net/qemu-netmap.c:203: +^Inetmap_update_fd_handler(s);$ WARNING: line over 80 characters #377: FILE: net/qemu-netmap.c:223: +static ssize_t netmap_receive_raw(NetClientState *nc, const uint8_t *buf, size_t size) ERROR: code indent should never use tabs #383: FILE: net/qemu-netmap.c:229: +^I/* request an early notification to avoid running dry */$ ERROR: code indent should never use tabs #384: FILE: net/qemu-netmap.c:230: +^Iif (ring->avail < ring->num_slots / 2 && s->write_poll == 0) {$ ERROR: code indent should never use tabs #385: FILE: net/qemu-netmap.c:231: +^I netmap_write_poll(s, 1);$ ERROR: code indent should never use tabs #386: FILE: net/qemu-netmap.c:232: +^I}$ ERROR: code indent should never use tabs #387: FILE: net/qemu-netmap.c:233: +^Iif (ring->avail == 0) { // cannot write$ ERROR: do not use C99 // comments #387: FILE: net/qemu-netmap.c:233: + if (ring->avail == 0) { // cannot write ERROR: trailing statements should be on next line #387: FILE: net/qemu-netmap.c:233: + if (ring->avail == 0) { // cannot write ERROR: code indent should never use tabs #388: FILE: net/qemu-netmap.c:234: +^I return 0;$ ERROR: code indent should never use tabs #389: FILE: net/qemu-netmap.c:235: +^I}$ ERROR: code indent should never use tabs #390: FILE: net/qemu-netmap.c:236: +^Iuint32_t i = ring->cur;$ ERROR: code indent should never use tabs #391: FILE: net/qemu-netmap.c:237: +^Iuint32_t idx = ring->slot[i].buf_idx;$ ERROR: code indent should never use tabs #392: FILE: net/qemu-netmap.c:238: +^Iuint8_t *dst = (u_char *)NETMAP_BUF(ring, idx);$ ERROR: code indent should never use tabs #394: FILE: net/qemu-netmap.c:240: +^Iring->slot[i].len = size;$ ERROR: code indent should never use tabs #395: FILE: net/qemu-netmap.c:241: +^Ipkt_copy(buf, dst, size);$ ERROR: code indent should never use tabs #396: FILE: net/qemu-netmap.c:242: +^Iring->cur = NETMAP_RING_NEXT(ring, i);$ ERROR: code indent should never use tabs #397: FILE: net/qemu-netmap.c:243: +^Iring->avail--;$ ERROR: do not use C99 // comments #402: FILE: net/qemu-netmap.c:248: +// complete a previous send (backend --> guest), enable the fd_read callback ERROR: space prohibited before that close parenthesis ')' #424: FILE: net/qemu-netmap.c:270: + while (ring->avail > 0 && qemu_can_send_packet(&s->nc) ) { ERROR: code indent should never use tabs #425: FILE: net/qemu-netmap.c:271: +^Iuint32_t i = ring->cur;$ ERROR: code indent should never use tabs #426: FILE: net/qemu-netmap.c:272: +^Iuint32_t idx = ring->slot[i].buf_idx;$ ERROR: code indent should never use tabs #427: FILE: net/qemu-netmap.c:273: +^Iuint8_t *src = (u_char *)NETMAP_BUF(ring, idx);$ ERROR: code indent should never use tabs #428: FILE: net/qemu-netmap.c:274: +^Iint size = ring->slot[i].len;$ ERROR: code indent should never use tabs #430: FILE: net/qemu-netmap.c:276: +^Iring->cur = NETMAP_RING_NEXT(ring, i);$ ERROR: code indent should never use tabs #431: FILE: net/qemu-netmap.c:277: +^Iring->avail--;$ ERROR: code indent should never use tabs #432: FILE: net/qemu-netmap.c:278: +^Isent++;$ ERROR: code indent should never use tabs #434: FILE: net/qemu-netmap.c:280: +^Iif (size == 0) {$ ERROR: code indent should never use tabs #435: FILE: net/qemu-netmap.c:281: +^I /* the guest does not receive anymore. Packet is queued, stop$ ERROR: code indent should never use tabs #436: FILE: net/qemu-netmap.c:282: +^I * reading from the backend until netmap_send_completed()$ ERROR: code indent should never use tabs #437: FILE: net/qemu-netmap.c:283: +^I */$ ERROR: code indent should never use tabs #438: FILE: net/qemu-netmap.c:284: +^I netmap_read_poll(s, 0);$ ERROR: code indent should never use tabs #439: FILE: net/qemu-netmap.c:285: +^I return;$ ERROR: code indent should never use tabs #440: FILE: net/qemu-netmap.c:286: +^I}$ ERROR: do not use C99 // comments #442: FILE: net/qemu-netmap.c:288: + netmap_read_poll(s, 1); // probably useless. ERROR: do not use C99 // comments #446: FILE: net/qemu-netmap.c:292: +// flush and close ERROR: do not use C99 // comments #475: FILE: net/qemu-netmap.c:321: +// .receive_raw = netmap_receive_raw, ERROR: do not use C99 // comments #476: FILE: net/qemu-netmap.c:322: +// .receive_iov = netmap_receive_iov, WARNING: line over 80 characters #486: FILE: net/qemu-netmap.c:332: +int net_init_netmap(const NetClientOptions *opts, const char *name, NetClientState *peer) ERROR: code indent should never use tabs #496: FILE: net/qemu-netmap.c:342: +^Inetmap_opts->has_ifname ? netmap_opts->ifname : "vale0");$ WARNING: braces {} are necessary for all arms of this statement #497: FILE: net/qemu-netmap.c:343: + if (netmap_open(&me)) [...] ERROR: code indent should never use tabs #498: FILE: net/qemu-netmap.c:344: +^Ireturn -1;$ ERROR: do not use C99 // comments #504: FILE: net/qemu-netmap.c:350: + netmap_read_poll(s, 1); // initially only poll for reads. total: 72 errors, 5 warnings, 461 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. Regards, Anthony Liguori