automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Gaetan Rivet <gaetan.rivet@6wind.com>
Subject: [dpdk-test-report] |WARNING| pw30179 [PATCH v4 03/16] pci: introduce PCI lib and bus
Date: Thu, 12 Oct 2017 10:18:42 +0200 (CEST)	[thread overview]
Message-ID: <20171012081842.243522A5E@dpdk.org> (raw)
In-Reply-To: <6b45a06c964497da5fc92b243b8969b41748786c.1507795823.git.gaetan.rivet@6wind.com>

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

_coding style issues_


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

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

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

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

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

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

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

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

ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#1041: 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'
#1543: FILE: drivers/bus/pci/linux/pci.c:152:
+	unsigned i = 0;

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

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

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

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

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

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

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

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2434: FILE: drivers/bus/pci/linux/pci_uio.c:114:
+	 * 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'.
#2456: FILE: drivers/bus/pci/linux/pci_uio.c:136:
+	ret = mknod(filename, S_IFCHR | S_IRUSR | S_IWUSR, dev);

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

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

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

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

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

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

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

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

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

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#10440: FILE: lib/librte_pci/include/rte_pci.h:138:
+#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 '('
#10448: FILE: lib/librte_pci/include/rte_pci.h:146:
+	(fd) = (typeof (fd))val;                                \

ERROR:SPACING: space required before the open parenthesis '('
#10450: FILE: lib/librte_pci/include/rte_pci.h:148:
+} while(0)

total: 8 errors, 23 warnings, 5610 lines checked

           reply	other threads:[~2017-10-12  8:18 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <6b45a06c964497da5fc92b243b8969b41748786c.1507795823.git.gaetan.rivet@6wind.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171012081842.243522A5E@dpdk.org \
    --to=checkpatch@dpdk.org \
    --cc=gaetan.rivet@6wind.com \
    --cc=test-report@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).