From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by dpdk.org (Postfix, from userid 1017) id C9F7D1B192; Mon, 18 Sep 2017 11:34:11 +0200 (CEST) In-Reply-To: <618e47fbcfbc9ead4c009f0456faab563f22a426.1505726803.git.gaetan.rivet@6wind.com> References: <618e47fbcfbc9ead4c009f0456faab563f22a426.1505726803.git.gaetan.rivet@6wind.com> To: test-report@dpdk.org Cc: Gaetan Rivet Message-Id: <20170918093411.C9F7D1B192@dpdk.org> Date: Mon, 18 Sep 2017 11:34:11 +0200 (CEST) From: checkpatch@dpdk.org Subject: [dpdk-test-report] |WARNING| pw28830 [PATCH v2 05/14] pci: introduce PCI lib and bus X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 09:34:11 -0000 Test-Label: checkpatch Test-Status: WARNING http://dpdk.org/patch/28830 _coding style issues_ WARNING:AVOID_EXTERNS: externs should be avoided in .c files #325: FILE: drivers/bus/pci/bsd/rte_pci.c:88: +extern struct rte_pci_bus rte_pci_bus; WARNING:LONG_LINE: line over 90 characters #393: FILE: drivers/bus/pci/bsd/rte_pci.c:156: + "skipping ", loc->domain, loc->bus, loc->devid, loc->function); WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #484: FILE: drivers/bus/pci/bsd/rte_pci.c:247: + unsigned i, max; WARNING:BRACES: braces {} are not necessary for single statement blocks #487: FILE: drivers/bus/pci/bsd/rte_pci.c:250: + if (dev == NULL) { + return -1; + } WARNING:LONG_LINE: line over 90 characters #548: FILE: drivers/bus/pci/bsd/rte_pci.c:311: + dev->mem_resource[i].addr = (void *)(bar.pbi_base & ~((uint64_t)0xf)); ERROR:ELSE_AFTER_BRACE: else should follow close brace '}' #558: FILE: drivers/bus/pci/bsd/rte_pci.c:321: + } + else { WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #597: FILE: drivers/bus/pci/bsd/rte_pci.c:360: + unsigned dev_count = 0; WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #618: FILE: drivers/bus/pci/bsd/rte_pci.c:381: + unsigned i; ERROR:SPACING: space required before the open parenthesis '(' #630: FILE: drivers/bus/pci/bsd/rte_pci.c:393: + } while(conf_io.status == PCI_GETCONF_MORE_DEVS); ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #1027: FILE: drivers/bus/pci/include/rte_bus_pci.h:114: +#define RTE_PCI_DEVICE(vend, dev) \ + RTE_CLASS_ANY_ID, \ + (vend), \ + (dev), \ + PCI_ANY_ID, \ + PCI_ANY_ID WARNING:AVOID_EXTERNS: externs should be avoided in .c files #1407: FILE: drivers/bus/pci/linux/rte_pci.c:58: +extern struct rte_pci_bus rte_pci_bus; WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #1498: FILE: drivers/bus/pci/linux/rte_pci.c:149: + unsigned i = 0; ERROR:SPACING: spaces required around that '<' (ctx:VxV) #1560: FILE: drivers/bus/pci/linux/rte_pci.c:211: + for (i = 0; idomain, loc->bus, loc->devid, loc->function); WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line #2577: FILE: drivers/bus/pci/linux/rte_pci_uio.c:397: + * uin16_t */ WARNING:LONG_LINE: line over 90 characters #2883: FILE: drivers/bus/pci/linux/rte_pci_vfio.c:130: + VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + WARNING:LONG_LINE: line over 90 characters #2900: FILE: drivers/bus/pci/linux/rte_pci_vfio.c:147: + VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + WARNING:LONG_LINE: line over 90 characters #2909: FILE: drivers/bus/pci/linux/rte_pci_vfio.c:156: + VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line #3010: FILE: drivers/bus/pci/linux/rte_pci_vfio.c:257: + * specified interrupt type, otherwise continue */ WARNING:UNNECESSARY_ELSE: else is not generally useful after a break or return #3016: FILE: drivers/bus/pci/linux/rte_pci_vfio.c:263: + return -1; + } else WARNING:LONG_LINE: line over 90 characters #3069: FILE: drivers/bus/pci/linux/rte_pci_vfio.c:316: + struct mapped_pci_res_list *vfio_res_list = RTE_TAILQ_CAST(rte_vfio_tailq.head, mapped_pci_res_list); ERROR:ASSIGN_IN_IF: do not use assignment in if condition #3083: FILE: drivers/bus/pci/linux/rte_pci_vfio.c:330: + if ((ret = vfio_setup_device(pci_get_sysfs_path(), pci_addr, WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line #3088: FILE: drivers/bus/pci/linux/rte_pci_vfio.c:335: + * easily mmap it when using VFIO) */ WARNING:LONG_LINE: line over 90 characters #3145: FILE: drivers/bus/pci/linux/rte_pci_vfio.c:392: + "error %i (%s) ", pci_addr, errno, strerror(errno)); WARNING:LONG_LINE: line over 90 characters #3271: FILE: drivers/bus/pci/linux/rte_pci_vfio.c:518: + RTE_LOG(ERR, EAL, " %s error setting up interrupts! ", pci_addr); WARNING:LONG_LINE: line over 90 characters #3279: FILE: drivers/bus/pci/linux/rte_pci_vfio.c:526: + RTE_LOG(ERR, EAL, " %s cannot set up bus mastering! ", pci_addr); WARNING:AVOID_EXTERNS: externs should be avoided in .c files #4127: FILE: drivers/bus/pci/rte_pci_common.c:58: +extern struct rte_pci_bus rte_pci_bus; WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided #9813: FILE: lib/librte_pci/include/rte_pci.h:130: +#define GET_PCIADDR_FIELD(in, fd, lim, dlm) \ +do { \ + unsigned long val; \ + char *end; \ + errno = 0; \ + val = strtoul((in), &end, 16); \ + if (errno != 0 || end[0] != (dlm) || val > (lim)) \ + return -EINVAL; \ + (fd) = (typeof (fd))val; \ + (in) = end + 1; \ +} while(0) WARNING:SPACING: space prohibited between function name and open parenthesis '(' #9821: FILE: lib/librte_pci/include/rte_pci.h:138: + (fd) = (typeof (fd))val; \ ERROR:SPACING: space required before the open parenthesis '(' #9823: FILE: lib/librte_pci/include/rte_pci.h:140: +} while(0) total: 9 errors, 30 warnings, 5225 lines checked