From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2B729A0562 for ; Sun, 29 Mar 2020 16:48:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5BD1E1C0D5; Sun, 29 Mar 2020 16:47:59 +0200 (CEST) Received: by dpdk.org (Postfix, from userid 1017) id 296C81C11C; Sun, 29 Mar 2020 16:47:49 +0200 (CEST) In-Reply-To: <20200329144342.1543749-15-jerinj@marvell.com> References: <20200329144342.1543749-15-jerinj@marvell.com> To: test-report@dpdk.org Cc: Message-Id: <20200329144749.296C81C11C@dpdk.org> Date: Sun, 29 Mar 2020 16:47:49 +0200 (CEST) From: checkpatch@dpdk.org Subject: [dpdk-test-report] |WARNING| pw67333 [PATCH v3 14/33] eal/trace: implement provider payload X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: test-report-bounces@dpdk.org Sender: "test-report" 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