* [dpdk-test-report] |WARNING| pw69680 [PATCH 3/8] trace: simplify trace point headers
[not found] <20200503203135.6493-4-david.marchand@redhat.com>
@ 2020-05-03 20:33 ` checkpatch
0 siblings, 0 replies; only message in thread
From: checkpatch @ 2020-05-03 20:33 UTC (permalink / raw)
To: test-report; +Cc: David Marchand
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/69680
_coding style issues_
WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#322: FILE: lib/librte_eal/include/rte_trace_point.h:343:
+#define __rte_trace_point_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_point_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
#334: FILE: lib/librte_eal/include/rte_trace_point.h:355:
+#define __rte_trace_point_emit_header_fp(t) \
+ if (!__rte_trace_point_fp_is_enabled()) \
+ return; \
+ __rte_trace_point_emit_header_generic(t)
WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#334: FILE: lib/librte_eal/include/rte_trace_point.h:355:
+#define __rte_trace_point_emit_header_fp(t) \
+ if (!__rte_trace_point_fp_is_enabled()) \
+ return; \
+ __rte_trace_point_emit_header_generic(t)
WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#345: FILE: lib/librte_eal/include/rte_trace_point.h:366:
+#define rte_trace_point_emit_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, 3 warnings, 284 lines checked
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-03 20:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200503203135.6493-4-david.marchand@redhat.com>
2020-05-03 20:33 ` [dpdk-test-report] |WARNING| pw69680 [PATCH 3/8] trace: simplify trace point headers 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).