[09/11] drivers/mempool: use new logtype wrapper
diff mbox series

Message ID 1566214919-32250-10-git-send-email-david.marchand@redhat.com
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series
  • Fixing log levels for dynamically loaded drivers
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

David Marchand Aug. 19, 2019, 11:41 a.m. UTC
Make use of the newly introduced wrapper.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c  | 8 ++------
 drivers/mempool/octeontx/octeontx_fpavf.c | 8 ++------
 2 files changed, 4 insertions(+), 12 deletions(-)

Patch
diff mbox series

diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index f26c30b..6398920 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -437,9 +437,5 @@  static const struct rte_mempool_ops dpaa2_mpool_ops = {
 
 MEMPOOL_REGISTER_OPS(dpaa2_mpool_ops);
 
-RTE_INIT(dpaa2_mempool_init_log)
-{
-	dpaa2_logtype_mempool = rte_log_register("mempool.dpaa2");
-	if (dpaa2_logtype_mempool >= 0)
-		rte_log_set_level(dpaa2_logtype_mempool, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(dpaa2_logtype_mempool, "mempool.dpaa2",
+	RTE_LOG_NOTICE, RTE_LOGTYPE_MEMPOOL);
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index baabc01..11c5894 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -108,12 +108,8 @@  static struct octeontx_fpadev fpadev;
 int octeontx_logtype_fpavf;
 int octeontx_logtype_fpavf_mbox;
 
-RTE_INIT(otx_pool_init_log)
-{
-	octeontx_logtype_fpavf = rte_log_register("pmd.mempool.octeontx");
-	if (octeontx_logtype_fpavf >= 0)
-		rte_log_set_level(octeontx_logtype_fpavf, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(octeontx_logtype_fpavf, "pmd.mempool.octeontx",
+	RTE_LOG_NOTICE, RTE_LOGTYPE_PMD);
 
 /* lock is taken by caller */
 static int