From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: jerinj@marvell.com, stable@dpdk.org,
Sunil Kumar Kori <skori@marvell.com>,
Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH] trace: fix build with clang 21
Date: Tue, 28 Oct 2025 15:39:52 +0100 [thread overview]
Message-ID: <20251028143952.4160487-1-david.marchand@redhat.com> (raw)
This was caught with recent clang.
The RTE_TRACE_POINT_ARGS() macro expects at least one parameter.
As a (void) function does not require any special tweaking with
__rte_unused, we can simply replace with a direct (void) token.
Build dir: /export/dpdk-next-net-mrvl/build-clang-static
Project version: 25.11.0-rc1
C compiler for the host machine: ccache clang (clang 21.1.4
"clang version 21.1.4")
In file included from ../lib/eal/common/eal_common_trace_points.c:7:
../lib/eal/include/rte_eal_trace.h:23:2: error: attribute 'unused'
cannot be applied to a 'void' parameter
[-Werror,-Wignored-attributes]
23 | RTE_TRACE_POINT_ARGS(void),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/eal/include/rte_trace_point_register.h:46:3: note: expanded
from macro 'RTE_TRACE_POINT_ARGS'
46 | (RTE_TRACE_POINT_ARGS_(RTE_TRACE_POINT_ARGS_COUNT(0,
__VA_ARGS__), __VA_ARGS__))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/eal/include/rte_trace_point_register.h:44:30: note: expanded
from macro 'RTE_TRACE_POINT_ARGS_'
44 | RTE_TRACE_POINT_ARGS_EXPAND(RTE_TRACE_POINT_ARGS_FUNC
(N))(__VA_ARGS__)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
../lib/eal/include/rte_trace_point_register.h:41:38: note: expanded
from macro 'RTE_TRACE_POINT_ARGS_FUNC'
41 | #define RTE_TRACE_POINT_ARGS_FUNC(a) RTE_TRACE_POINT_ARGS_ ## a
| ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0
to see all)
../lib/eal/include/rte_trace_point_register.h:42:42: note: expanded
from macro 'RTE_TRACE_POINT_ARGS_EXPAND'
42 | #define RTE_TRACE_POINT_ARGS_EXPAND(...) __VA_ARGS__
| ^
../lib/eal/include/rte_trace_point_register.h:26:35: note: expanded
from macro 'RTE_TRACE_POINT_ARGS_1'
26 | #define RTE_TRACE_POINT_ARGS_1(a) __rte_unused a
| ^~~~~~~~~~~~
../lib/eal/include/rte_common.h:248:37: note: expanded
from macro '__rte_unused'
248 | #define __rte_unused __attribute__((__unused__))
| ^~~~~~~~~~
1 error generated.
Cc: stable@dpdk.org
Reported-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
app/test/test_trace.h | 2 +-
lib/eal/include/rte_eal_trace.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test/test_trace.h b/app/test/test_trace.h
index 4ad44e2bea..123ec8290a 100644
--- a/app/test/test_trace.h
+++ b/app/test/test_trace.h
@@ -13,5 +13,5 @@ RTE_TRACE_POINT(
RTE_TRACE_POINT_FP(
app_dpdk_test_fp,
- RTE_TRACE_POINT_ARGS(void),
+ (void),
)
diff --git a/lib/eal/include/rte_eal_trace.h b/lib/eal/include/rte_eal_trace.h
index 9ad2112801..152474bf84 100644
--- a/lib/eal/include/rte_eal_trace.h
+++ b/lib/eal/include/rte_eal_trace.h
@@ -20,7 +20,7 @@ extern "C" {
/* Generic */
RTE_TRACE_POINT(
rte_eal_trace_generic_void,
- RTE_TRACE_POINT_ARGS(void),
+ (void),
)
RTE_TRACE_POINT(
--
2.51.0
next reply other threads:[~2025-10-28 14:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 14:39 David Marchand [this message]
2025-10-28 16:21 ` Jerin Jacob
2025-10-28 16:25 ` David Marchand
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=20251028143952.4160487-1-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=roretzla@linux.microsoft.com \
--cc=skori@marvell.com \
--cc=stable@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).