automatic DPDK test reports
 help / color / mirror / Atom feed
* [dpdk-test-report] |WARNING| pw67773 [PATCH v4 14/33] eal/trace: implement provider payload
       [not found] <20200403153709.3703448-15-jerinj@marvell.com>
@ 2020-04-03 15:41 ` checkpatch
  0 siblings, 0 replies; only message in thread
From: checkpatch @ 2020-04-03 15:41 UTC (permalink / raw)
  To: test-report; +Cc: jerinj

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

_coding style issues_


WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#160: FILE: lib/librte_eal/include/rte_trace_provider.h:94:
+#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
#172: FILE: lib/librte_eal/include/rte_trace_provider.h:106:
+#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
#172: FILE: lib/librte_eal/include/rte_trace_provider.h:106:
+#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
#172: FILE: lib/librte_eal/include/rte_trace_provider.h:106:
+#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
#197: FILE: lib/librte_eal/include/rte_trace_provider.h:131:
+#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, 127 lines checked

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-03 15:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200403153709.3703448-15-jerinj@marvell.com>
2020-04-03 15:41 ` [dpdk-test-report] |WARNING| pw67773 [PATCH v4 14/33] eal/trace: implement provider payload checkpatch

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).