From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2BF26A046B for ; Mon, 19 Aug 2019 13:43:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0475F1BEEA; Mon, 19 Aug 2019 13:43:08 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 38A7B1BEC3 for ; Mon, 19 Aug 2019 13:43:06 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9B8FC106E96B; Mon, 19 Aug 2019 11:43:05 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-204-32.brq.redhat.com [10.40.204.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB53E100195F; Mon, 19 Aug 2019 11:43:02 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Nipun Gupta , Rosen Xu , Tianfei zhang , Bruce Richardson , Xiaoyun Li , Jingjing Wu , Shreyansh Jain , Hemant Agrawal Date: Mon, 19 Aug 2019 13:41:59 +0200 Message-Id: <1566214919-32250-12-git-send-email-david.marchand@redhat.com> In-Reply-To: <1566214919-32250-1-git-send-email-david.marchand@redhat.com> References: <1566214919-32250-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Mon, 19 Aug 2019 11:43:05 +0000 (UTC) Subject: [dpdk-dev] [PATCH 11/11] drivers/raw: use new logtype wrapper X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Make use of the newly introduced wrapper. Signed-off-by: David Marchand --- drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 8 ++------ drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 8 ++------ drivers/raw/ifpga/ifpga_rawdev.c | 8 ++------ drivers/raw/ioat/ioat_rawdev.c | 8 ++------ drivers/raw/ntb/ntb.c | 8 ++------ drivers/raw/skeleton/skeleton_rawdev.c | 8 ++------ 6 files changed, 12 insertions(+), 36 deletions(-) diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c index 3f42da1..ff02855 100644 --- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c +++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c @@ -283,9 +283,5 @@ static struct rte_vdev_driver dpaa2_cmdif_drv = { RTE_PMD_REGISTER_VDEV(DPAA2_CMDIF_PMD_NAME, dpaa2_cmdif_drv); -RTE_INIT(dpaa2_cmdif_init_log) -{ - dpaa2_cmdif_logtype = rte_log_register("pmd.raw.dpaa2.cmdif"); - if (dpaa2_cmdif_logtype >= 0) - rte_log_set_level(dpaa2_cmdif_logtype, RTE_LOG_INFO); -} +RTE_LOG_REGISTER(dpaa2_cmdif_logtype, "pmd.raw.dpaa2.cmdif", + RTE_LOG_INFO, RTE_LOGTYPE_PMD); diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c index a391913..6af7c14 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c @@ -1345,9 +1345,5 @@ RTE_PMD_REGISTER_DPAA2(dpaa2_qdma, rte_dpaa2_qdma_pmd); RTE_PMD_REGISTER_PARAM_STRING(dpaa2_qdma, "no_prefetch= "); -RTE_INIT(dpaa2_qdma_init_log) -{ - dpaa2_qdma_logtype = rte_log_register("pmd.raw.dpaa2.qdma"); - if (dpaa2_qdma_logtype >= 0) - rte_log_set_level(dpaa2_qdma_logtype, RTE_LOG_INFO); -} +RTE_LOG_REGISTER(dpaa2_qdma_logtype, "pmd.raw.dpaa2.qdma", + RTE_LOG_INFO, RTE_LOGTYPE_PMD); diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c index fef89e6..dc2f3c1 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -757,12 +757,8 @@ RTE_PMD_REGISTER_PCI(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd); RTE_PMD_REGISTER_PCI_TABLE(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd); RTE_PMD_REGISTER_KMOD_DEP(ifpga_rawdev_pci_driver, "* igb_uio | uio_pci_generic | vfio-pci"); -RTE_INIT(ifpga_rawdev_init_log) -{ - ifpga_rawdev_logtype = rte_log_register("driver.raw.init"); - if (ifpga_rawdev_logtype >= 0) - rte_log_set_level(ifpga_rawdev_logtype, RTE_LOG_NOTICE); -} +RTE_LOG_REGISTER(ifpga_rawdev_logtype, "pmd.rawdev.ifpga.init", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); static const char * const valid_args[] = { #define IFPGA_ARG_NAME "ifpga" diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c index 7270ad7..023eb0e 100644 --- a/drivers/raw/ioat/ioat_rawdev.c +++ b/drivers/raw/ioat/ioat_rawdev.c @@ -347,9 +347,5 @@ RTE_PMD_REGISTER_PCI(IOAT_PMD_RAWDEV_NAME, ioat_pmd_drv); RTE_PMD_REGISTER_PCI_TABLE(IOAT_PMD_RAWDEV_NAME, pci_id_ioat_map); RTE_PMD_REGISTER_KMOD_DEP(IOAT_PMD_RAWDEV_NAME, "* igb_uio | uio_pci_generic"); -RTE_INIT(ioat_pmd_init_log) -{ - ioat_pmd_logtype = rte_log_register(IOAT_PMD_LOG_NAME); - if (ioat_pmd_logtype >= 0) - rte_log_set_level(ioat_pmd_logtype, RTE_LOG_INFO); -} +RTE_LOG_REGISTER(ioat_pmd_logtype, IOAT_PMD_LOG_NAME, + RTE_LOG_INFO, RTE_LOGTYPE_PMD); diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c index bfecce1..e5e07a7 100644 --- a/drivers/raw/ntb/ntb.c +++ b/drivers/raw/ntb/ntb.c @@ -835,9 +835,5 @@ RTE_PMD_REGISTER_PCI(raw_ntb, rte_ntb_pmd); RTE_PMD_REGISTER_PCI_TABLE(raw_ntb, pci_id_ntb_map); RTE_PMD_REGISTER_KMOD_DEP(raw_ntb, "* igb_uio | uio_pci_generic | vfio-pci"); -RTE_INIT(ntb_init_log) -{ - ntb_logtype = rte_log_register("pmd.raw.ntb"); - if (ntb_logtype >= 0) - rte_log_set_level(ntb_logtype, RTE_LOG_DEBUG); -} +RTE_LOG_REGISTER(ntb_logtype, "pmd.raw.ntb", + RTE_LOG_DEBUG, RTE_LOGTYPE_PMD); diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c index 586183a..69c2bba 100644 --- a/drivers/raw/skeleton/skeleton_rawdev.c +++ b/drivers/raw/skeleton/skeleton_rawdev.c @@ -760,9 +760,5 @@ static struct rte_vdev_driver skeleton_pmd_drv = { RTE_PMD_REGISTER_VDEV(SKELETON_PMD_RAWDEV_NAME, skeleton_pmd_drv); -RTE_INIT(skeleton_pmd_init_log) -{ - skeleton_pmd_logtype = rte_log_register("rawdev.skeleton"); - if (skeleton_pmd_logtype >= 0) - rte_log_set_level(skeleton_pmd_logtype, RTE_LOG_INFO); -} +RTE_LOG_REGISTER(skeleton_pmd_logtype, "pmd.rawdev.skeleton", + RTE_LOG_INFO, RTE_LOGTYPE_PMD); -- 1.8.3.1