From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: <jerinj@marvell.com>
Subject: [dpdk-test-report] |WARNING| pw68888 [PATCH v6 14/33] eal/trace: implement provider payload
Date: Sun, 19 Apr 2020 12:07:20 +0200 (CEST) [thread overview]
Message-ID: <20200419100720.DC2831D5B7@dpdk.org> (raw)
In-Reply-To: <20200419100133.3232316-15-jerinj@marvell.com>
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/68888
_coding style issues_
WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#192: FILE: lib/librte_eal/include/rte_trace_point_provider.h:91:
+#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
#204: FILE: lib/librte_eal/include/rte_trace_point_provider.h:103:
+#define __rte_trace_point_emit_header_fp(t)\
+ if (__rte_trace_point_fp_is_enabled() == false)\
+ return;\
+ __rte_trace_point_emit_header_generic(t)
WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#204: FILE: lib/librte_eal/include/rte_trace_point_provider.h:103:
+#define __rte_trace_point_emit_header_fp(t)\
+ if (__rte_trace_point_fp_is_enabled() == false)\
+ return;\
+ __rte_trace_point_emit_header_generic(t)
WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#215: FILE: lib/librte_eal/include/rte_trace_point_provider.h:114:
+#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, 124 lines checked
parent reply other threads:[~2020-04-19 10:07 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20200419100133.3232316-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=20200419100720.DC2831D5B7@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).