automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: <jerinj@marvell.com>
Subject: [dpdk-test-report] |WARNING| pw67333 [PATCH v3 14/33] eal/trace: implement provider payload
Date: Sun, 29 Mar 2020 16:47:49 +0200 (CEST)	[thread overview]
Message-ID: <20200329144749.296C81C11C@dpdk.org> (raw)
In-Reply-To: <20200329144342.1543749-15-jerinj@marvell.com>

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

_coding style issues_


WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#154: FILE: lib/librte_eal/common/include/rte_trace_provider.h:92:
+#define __rte_trace_emit_header_generic(t)\
+void *mem;\
+do {\
+	const uint64_t val = __atomic_load_n(t, __ATOMIC_ACQUIRE);\
+	if (likely(!(val & __RTE_TRACE_FIELD_ENABLE_MASK)))\
+		return;\
+	mem = __rte_trace_mem_get(val);\
+	if (unlikely(mem == NULL)) \
+		return;\
+	mem = __rte_trace_emit_ev_header(mem, val);\
+} while (0)

ERROR:MULTISTATEMENT_MACRO_USE_DO_WHILE: Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defects
#166: FILE: lib/librte_eal/common/include/rte_trace_provider.h:104:
+#define __rte_trace_emit_header_dp(t)\
+	if (rte_trace_is_dp_enabled())\
+		return;\
+	__rte_trace_emit_header_generic(t);

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#166: FILE: lib/librte_eal/common/include/rte_trace_provider.h:104:
+#define __rte_trace_emit_header_dp(t)\
+	if (rte_trace_is_dp_enabled())\
+		return;\
+	__rte_trace_emit_header_generic(t);

WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#166: FILE: lib/librte_eal/common/include/rte_trace_provider.h:104:
+#define __rte_trace_emit_header_dp(t)\
+	if (rte_trace_is_dp_enabled())\
+		return;\
+	__rte_trace_emit_header_generic(t);

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#191: FILE: lib/librte_eal/common/include/rte_trace_provider.h:129:
+#define rte_trace_ctf_string(in)\
+do {\
+	if (unlikely(in == NULL))\
+		return;\
+	rte_strscpy(mem, in, __RTE_TRACE_EMIT_STRING_LEN_MAX);\
+	mem = RTE_PTR_ADD(mem, __RTE_TRACE_EMIT_STRING_LEN_MAX);\
+} while (0)

total: 1 errors, 4 warnings, 104 lines checked

           reply	other threads:[~2020-03-29 14:48 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20200329144342.1543749-15-jerinj@marvell.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=20200329144749.296C81C11C@dpdk.org \
    --to=checkpatch@dpdk.org \
    --cc=jerinj@marvell.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).