[06/11] drivers/compress: use new logtype wrapper
diff mbox series

Message ID 1566214919-32250-7-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/compress/isal/isal_compress_pmd.c | 8 ++------
 drivers/compress/octeontx/otx_zip_pmd.c   | 8 ++------
 drivers/compress/zlib/zlib_pmd.c          | 8 ++------
 3 files changed, 6 insertions(+), 18 deletions(-)

Patch
diff mbox series

diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index 7d2b05c..a273229 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -753,9 +753,5 @@  RTE_PMD_REGISTER_VDEV(COMPDEV_NAME_ISAL_PMD, compdev_isal_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(COMPDEV_NAME_ISAL_PMD,
 	"socket_id=<int>");
 
-RTE_INIT(isal_init_log)
-{
-	isal_logtype_driver = rte_log_register("pmd.compress.isal");
-	if (isal_logtype_driver >= 0)
-		rte_log_set_level(isal_logtype_driver, RTE_LOG_INFO);
-}
+RTE_LOG_REGISTER(isal_logtype_driver, "pmd.compress.isal",
+	RTE_LOG_INFO, RTE_LOGTYPE_PMD);
diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
index a1651b2..a0a2f05 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -647,9 +647,5 @@  static struct rte_pci_driver octtx_zip_pmd = {
 RTE_PMD_REGISTER_PCI(COMPRESSDEV_NAME_ZIP_PMD, octtx_zip_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(COMPRESSDEV_NAME_ZIP_PMD, pci_id_octtx_zipvf_table);
 
-RTE_INIT(octtx_zip_init_log)
-{
-	octtx_zip_logtype_driver = rte_log_register("pmd.compress.octeontx");
-	if (octtx_zip_logtype_driver >= 0)
-		rte_log_set_level(octtx_zip_logtype_driver, RTE_LOG_INFO);
-}
+RTE_LOG_REGISTER(octtx_zip_logtype_driver, "pmd.compress.octeontx",
+	RTE_LOG_INFO, RTE_LOGTYPE_PMD);
diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index 19f9200..e2b2c16 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -427,9 +427,5 @@  static struct rte_vdev_driver zlib_pmd_drv = {
 
 RTE_PMD_REGISTER_VDEV(COMPRESSDEV_NAME_ZLIB_PMD, zlib_pmd_drv);
 
-RTE_INIT(zlib_init_log)
-{
-	zlib_logtype_driver = rte_log_register("pmd.compress.zlib");
-	if (zlib_logtype_driver >= 0)
-		rte_log_set_level(zlib_logtype_driver, RTE_LOG_INFO);
-}
+RTE_LOG_REGISTER(zlib_logtype_driver, "pmd.compress.zlib",
+	RTE_LOG_INFO, RTE_LOGTYPE_PMD);