[v11,2/9] trace: change scope of conditional block

Message ID 20251024054830.933910-3-tduszynski@marvell.com (mailing list archive)
State Rejected
Delegated to: David Marchand
Headers
Series lib/pmu: cleanups and trace integration |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tomasz Duszynski Oct. 24, 2025, 5:48 a.m. UTC
If ALLOW_EXPERIMENTAL_API isn't defined warnings should show up but
build itself should not fail (unless -Dwerror=true).

In order to avoid build failures change the scope of conditional block.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
---
 lib/eal/include/rte_trace_point.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/lib/eal/include/rte_trace_point.h b/lib/eal/include/rte_trace_point.h
index c0ebf1ce13..394b2619c5 100644
--- a/lib/eal/include/rte_trace_point.h
+++ b/lib/eal/include/rte_trace_point.h
@@ -289,7 +289,6 @@  int __rte_trace_point_register(rte_trace_point_t *trace, const char *name,
 #ifndef __DOXYGEN__
 
 #ifndef _RTE_TRACE_POINT_REGISTER_H_
-#ifdef ALLOW_EXPERIMENTAL_API
 
 #define __RTE_TRACE_EVENT_HEADER_ID_SHIFT (48)
 
@@ -314,6 +313,8 @@  struct __rte_trace_header {
 	uint8_t mem[];
 };
 
+#ifdef ALLOW_EXPERIMENTAL_API
+
 RTE_DECLARE_PER_LCORE(void *, trace_mem);
 
 static __rte_always_inline void *