automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Ola Liljedahl <Ola.Liljedahl@arm.com>
Subject: [dpdk-test-report] |WARNING| pw50066 [RFC] lfring: lock-free ring buffer
Date: Mon, 28 Jan 2019 13:29:34 +0100 (CET)	[thread overview]
Message-ID: <20190128122934.A16A058FA@dpdk.org> (raw)
In-Reply-To: <1548678513-14348-1-git-send-email-ola.liljedahl@arm.com>

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

_coding style issues_


WARNING:LONG_LINE: line over 90 characters
#166: FILE: lib/librte_lfring/lockfree16.h:12:
+#define HAS_RLS(mo) ((mo) == __ATOMIC_RELEASE || (mo) == __ATOMIC_ACQ_REL || (mo) == __ATOMIC_SEQ_CST)

ERROR:OPEN_BRACE: open brace '{' following union go on the same line
#240: FILE: lib/librte_lfring/lockfree16.h:86:
+union u128
+{

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'cmpxchg16b', this function's name, in a string
#252: FILE: lib/librte_lfring/lockfree16.h:98:
+		("lock cmpxchg16b %1
	setz %0"

WARNING:UNNECESSARY_ELSE: else is not generally useful after a break or return
#276: FILE: lib/librte_lfring/lockfree16.h:122:
+		return true;
+	} else {

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#362: FILE: lib/librte_lfring/rte_lfring.c:46:
+rte_lfring_get_memsize(unsigned count)

ERROR:SPACING: space prohibited before that close parenthesis ')'
#367: FILE: lib/librte_lfring/rte_lfring.c:51:
+	if ((!POWEROF2(count)) || (count > 0x80000000U )) {

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#380: FILE: lib/librte_lfring/rte_lfring.c:64:
+rte_lfring_init(struct rte_lfring *r, const char *name, unsigned count,

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#381: FILE: lib/librte_lfring/rte_lfring.c:65:
+		unsigned flags)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#400: FILE: lib/librte_lfring/rte_lfring.c:84:
+	for (uint64_t i = 0; i < r->size; i++)
+	{

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 12)
#400: FILE: lib/librte_lfring/rte_lfring.c:84:
+	for (uint64_t i = 0; i < r->size; i++)
+	{

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#411: FILE: lib/librte_lfring/rte_lfring.c:95:
+rte_lfring_create(const char *name, unsigned count, int socket_id,

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#412: FILE: lib/librte_lfring/rte_lfring.c:96:
+		  unsigned flags)

ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar"
#420: FILE: lib/librte_lfring/rte_lfring.c:104:
+	struct rte_lfring_list* ring_list = NULL;

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#452: FILE: lib/librte_lfring/rte_lfring.c:136:
+	 * rte_errno for us appropriately - hence no check in this this function */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#458: FILE: lib/librte_lfring/rte_lfring.c:142:
+		 * arguments above */

ERROR:OPEN_BRACE: open brace '{' following struct go on the same line
#638: FILE: lib/librte_lfring/rte_lfring.h:55:
+struct rte_lfr_element
+{

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#639: FILE: lib/librte_lfring/rte_lfring.h:56:
+    void *ptr;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#640: FILE: lib/librte_lfring/rte_lfring.h:57:
+    uintptr_t idx;$

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#685: FILE: lib/librte_lfring/rte_lfring.h:102:
+ssize_t rte_lfring_get_memsize(unsigned count);

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#714: FILE: lib/librte_lfring/rte_lfring.h:131:
+int rte_lfring_init(struct rte_lfring *r, const char *name, unsigned count,

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#715: FILE: lib/librte_lfring/rte_lfring.h:132:
+		    unsigned flags);

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#756: FILE: lib/librte_lfring/rte_lfring.h:173:
+struct rte_lfring *rte_lfring_create(const char *name, unsigned count,

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#757: FILE: lib/librte_lfring/rte_lfring.h:174:
+				     int socket_id, unsigned flags);

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#780: FILE: lib/librte_lfring/rte_lfring.h:197:
+    return (int64_t)(a - b) < 0;$

ERROR:SPACING: space prohibited after that '&' (ctx:WxW)
#878: FILE: lib/librte_lfring/rte_lfring.h:295:
+		struct rte_lfr_element *slot = &r->ring[tail & mask];
 		                                             ^

ERROR:SPACING: space prohibited after that '-' (ctx:WxW)
#882: FILE: lib/librte_lfring/rte_lfring.h:299:
+			if (old.e.idx != tail - size) {
 			                      ^

WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines
#885: FILE: lib/librte_lfring/rte_lfring.h:302:
+					/* We are far behind,
+					   restart with fresh index */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#885: FILE: lib/librte_lfring/rte_lfring.h:302:
+					   restart with fresh index */

WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines
#890: FILE: lib/librte_lfring/rte_lfring.h:307:
+					/* Slot already enqueued,
+					   try next slot */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#890: FILE: lib/librte_lfring/rte_lfring.h:307:
+					   try next slot */

WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines
#896: FILE: lib/librte_lfring/rte_lfring.h:313:
+			/* Found slot that was used one lap back,
+			   try to enqueue next element */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#896: FILE: lib/librte_lfring/rte_lfring.h:313:
+			   try to enqueue next element */

ERROR:SPACING: space prohibited after that '-' (ctx:WxW)
#971: FILE: lib/librte_lfring/rte_lfring.h:388:
+	actual = RTE_MIN((int64_t)(tail - head), (int64_t)nelems);
 	                                ^

ERROR:SPACING: space prohibited after that '-' (ctx:WxW)
#977: FILE: lib/librte_lfring/rte_lfring.h:394:
+		*available = tail - (head + actual);
 		                  ^

ERROR:SPACING: space prohibited after that '-' (ctx:WxW)
#993: FILE: lib/librte_lfring/rte_lfring.h:410:
+		actual = RTE_MIN((int64_t)(tail - head), (int64_t)nelems);
 		                                ^

ERROR:SPACING: space prohibited after that '-' (ctx:WxW)
#1004: FILE: lib/librte_lfring/rte_lfring.h:421:
+		*available = tail - (head + actual);
 		                  ^

ERROR:SPACING: space prohibited after that '-' (ctx:WxW)
#1047: FILE: lib/librte_lfring/rte_lfring.h:464:
+	uint64_t avail = tail - head;
 	                      ^

total: 12 errors, 25 warnings, 1038 lines checked

           reply	other threads:[~2019-01-28 12:29 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1548678513-14348-1-git-send-email-ola.liljedahl@arm.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=20190128122934.A16A058FA@dpdk.org \
    --to=checkpatch@dpdk.org \
    --cc=Ola.Liljedahl@arm.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).