From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: David Marchand <david.marchand@redhat.com>
Subject: [dpdk-test-report] |WARNING| pw69680 [PATCH 3/8] trace: simplify trace point headers
Date: Sun, 3 May 2020 22:33:49 +0200 (CEST) [thread overview]
Message-ID: <20200503203349.B41D81D539@dpdk.org> (raw)
In-Reply-To: <20200503203135.6493-4-david.marchand@redhat.com>
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
parent reply other threads:[~2020-05-03 20:33 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20200503203135.6493-4-david.marchand@redhat.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=20200503203349.B41D81D539@dpdk.org \
--to=checkpatch@dpdk.org \
--cc=david.marchand@redhat.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).