[v2] rcu: fix build failure with debug dp log level

Message ID 20220929102714.550-1-anoobj@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [v2] rcu: fix build failure with debug dp log level |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

Anoob Joseph Sept. 29, 2022, 10:27 a.m. UTC
  Build fails if RTE_LOG_DP_LEVEL is set to RTE_LOG_DEBUG. Fix the
same by including the required header.

../lib/rcu/rte_rcu_qsbr.h:678:40: error: expected ‘)’ before ‘PRIu64’
  678 |    "%s: status: least acked token = %" PRIu64,
      |                                        ^~~~~~

Fixes: 30a1de105a5f ("lib: remove unneeded header includes")
Cc: sean.morrissey@intel.com

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 lib/rcu/rte_rcu_qsbr.h | 1 +
 1 file changed, 1 insertion(+)

--
2.25.1
  

Comments

Thomas Monjalon Oct. 6, 2022, 10:40 a.m. UTC | #1
29/09/2022 12:27, Anoob Joseph:
> Build fails if RTE_LOG_DP_LEVEL is set to RTE_LOG_DEBUG. Fix the
> same by including the required header.
> 
> ../lib/rcu/rte_rcu_qsbr.h:678:40: error: expected ‘)’ before ‘PRIu64’
>   678 |    "%s: status: least acked token = %" PRIu64,
>       |                                        ^~~~~~
> 
> Fixes: 30a1de105a5f ("lib: remove unneeded header includes")
> Cc: sean.morrissey@intel.com
> 
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>

Applied, thanks.

Would be good to avoid the tool doing the same mistake again.
  

Patch

diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h
index d81bf5e8db..36571c15df 100644
--- a/lib/rcu/rte_rcu_qsbr.h
+++ b/lib/rcu/rte_rcu_qsbr.h
@@ -29,6 +29,7 @@ 
 extern "C" {
 #endif

+#include <inttypes.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdint.h>