[dpdk-test-report] |WARNING| pw30961 [PATCH v8 23/25] pci: introduce PCI lib and bus

checkpatch at dpdk.org checkpatch at dpdk.org
Thu Oct 26 12:10:10 CEST 2017


Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/30961

_coding style issues_


WARNING:LONG_LINE: line over 90 characters
#476: FILE: drivers/bus/pci/bsd/pci.c:157:
+				"skipping
", loc->domain, loc->bus, loc->devid, loc->function);

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#567: FILE: drivers/bus/pci/bsd/pci.c:248:
+	unsigned i, max;

WARNING:BRACES: braces {} are not necessary for single statement blocks
#570: FILE: drivers/bus/pci/bsd/pci.c:251:
+	if (dev == NULL) {
+		return -1;
+	}

WARNING:LONG_LINE: line over 90 characters
#631: FILE: drivers/bus/pci/bsd/pci.c:312:
+			dev->mem_resource[i].addr = (void *)(bar.pbi_base & ~((uint64_t)0xf));

ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#641: FILE: drivers/bus/pci/bsd/pci.c:322:
+	}
+	else {

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#680: FILE: drivers/bus/pci/bsd/pci.c:361:
+	unsigned dev_count = 0;

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#701: FILE: drivers/bus/pci/bsd/pci.c:382:
+		unsigned i;

ERROR:SPACING: space required before the open parenthesis '('
#713: FILE: drivers/bus/pci/bsd/pci.c:394:
+	} while(conf_io.status == PCI_GETCONF_MORE_DEVS);

ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#1120: 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:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1547: FILE: drivers/bus/pci/linux/pci.c:153:
+	unsigned i = 0;

ERROR:SPACING: spaces required around that '<' (ctx:VxV)
#1609: FILE: drivers/bus/pci/linux/pci.c:215:
+	for (i = 0; i<PCI_MAX_RESOURCE; i++) {
 	             ^

ERROR:SPACING: space required after that ',' (ctx:VxV)
#1823: FILE: drivers/bus/pci/linux/pci.c:429:
+	splitaddr.function = strchr(splitaddr.devid,'.');
 	                                           ^

WARNING:NAKED_SSCANF: unchecked sscanf return value
#2078: FILE: drivers/bus/pci/linux/pci.c:684:
+			sscanf(ptr, "%04hx-%04hx", &start, &end);

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#2305: FILE: drivers/bus/pci/linux/pci_init.h:79:
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)

ERROR:CODE_INDENT: code indent should use tabs where possible
#2322: FILE: drivers/bus/pci/linux/pci_init.h:96:
+^I^I        struct rte_pci_ioport *p);$

ERROR:GLOBAL_INITIALISERS: do not initialise globals to NULL
#2401: FILE: drivers/bus/pci/linux/pci_uio.c:58:
+void *pci_map_addr = NULL;

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#2449: FILE: drivers/bus/pci/linux/pci_uio.c:106:
+pci_mknod_uio_dev(const char *sysfs_uio_path, unsigned uio_num)

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#2454: FILE: drivers/bus/pci/linux/pci_uio.c:111:
+	unsigned major, minor;

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2458: FILE: drivers/bus/pci/linux/pci_uio.c:115:
+	 * of the uio device and read its content */

WARNING:SYMBOLIC_PERMS: Symbolic permissions 'S_IRUSR | S_IWUSR' are not preferred. Consider using octal permissions '0600'.
#2480: FILE: drivers/bus/pci/linux/pci_uio.c:137:
+	ret = mknod(filename, S_IFCHR | S_IRUSR | S_IWUSR, dev);

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2507: FILE: drivers/bus/pci/linux/pci_uio.c:164:
+	 * or uio:uioX */

WARNING:LONG_LINE: line over 90 characters
#2601: FILE: drivers/bus/pci/linux/pci_uio.c:258:
+				"skipping
", loc->domain, loc->bus, loc->devid, loc->function);

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2741: FILE: drivers/bus/pci/linux/pci_uio.c:398:
+	 * uin16_t */

WARNING:LONG_LINE: line over 90 characters
#3048: FILE: drivers/bus/pci/linux/pci_vfio.c:131:
+					VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +

WARNING:LONG_LINE: line over 90 characters
#3065: FILE: drivers/bus/pci/linux/pci_vfio.c:148:
+					VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +

WARNING:LONG_LINE: line over 90 characters
#3074: FILE: drivers/bus/pci/linux/pci_vfio.c:157:
+					VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#3180: FILE: drivers/bus/pci/linux/pci_vfio.c:263:
+		 * specified interrupt type, otherwise continue */

WARNING:UNNECESSARY_ELSE: else is not generally useful after a break or return
#3186: FILE: drivers/bus/pci/linux/pci_vfio.c:269:
+				return -1;
+			} else

WARNING:LONG_LINE: line over 90 characters
#3419: FILE: drivers/bus/pci/linux/pci_vfio.c:502:
+					"error %i (%s)
", pci_addr, errno, strerror(errno));

total: 7 errors, 22 warnings, 5874 lines checked


More information about the test-report mailing list