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 B6CD7A046B for ; Mon, 19 Aug 2019 13:42:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 494F61BEC9; Mon, 19 Aug 2019 13:42:24 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 8CB0E1BEC5 for ; Mon, 19 Aug 2019 13:42:22 +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 0267810C0520; Mon, 19 Aug 2019 11:42:22 +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 C96ED100195F; Mon, 19 Aug 2019 11:42:19 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Hemant Agrawal , Sachin Saxena , Rosen Xu , Stephen Hemminger Date: Mon, 19 Aug 2019 13:41:52 +0200 Message-Id: <1566214919-32250-5-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.65]); Mon, 19 Aug 2019 11:42:22 +0000 (UTC) Subject: [dpdk-dev] [PATCH 04/11] drivers/bus: 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/bus/dpaa/dpaa_bus.c | 26 ++++++++------------------ drivers/bus/fslmc/fslmc_bus.c | 9 ++------- drivers/bus/ifpga/ifpga_bus.c | 8 ++------ drivers/bus/vdev/vdev.c | 8 ++------ drivers/bus/vmbus/vmbus_common.c | 8 ++------ 5 files changed, 16 insertions(+), 43 deletions(-) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 07cc5c6..2eab45b 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -744,21 +744,11 @@ static struct rte_dpaa_bus rte_dpaa_bus = { RTE_REGISTER_BUS(FSL_DPAA_BUS_NAME, rte_dpaa_bus.bus); -RTE_INIT(dpaa_init_log) -{ - dpaa_logtype_bus = rte_log_register("bus.dpaa"); - if (dpaa_logtype_bus >= 0) - rte_log_set_level(dpaa_logtype_bus, RTE_LOG_NOTICE); - - dpaa_logtype_mempool = rte_log_register("mempool.dpaa"); - if (dpaa_logtype_mempool >= 0) - rte_log_set_level(dpaa_logtype_mempool, RTE_LOG_NOTICE); - - dpaa_logtype_pmd = rte_log_register("pmd.net.dpaa"); - if (dpaa_logtype_pmd >= 0) - rte_log_set_level(dpaa_logtype_pmd, RTE_LOG_NOTICE); - - dpaa_logtype_eventdev = rte_log_register("pmd.event.dpaa"); - if (dpaa_logtype_eventdev >= 0) - rte_log_set_level(dpaa_logtype_eventdev, RTE_LOG_NOTICE); -} +RTE_LOG_REGISTER(dpaa_logtype_bus, "bus.dpaa", + RTE_LOG_NOTICE, RTE_LOGTYPE_EAL); +RTE_LOG_REGISTER(dpaa_logtype_mempool, "mempool.dpaa", + RTE_LOG_NOTICE, RTE_LOGTYPE_MEMPOOL); +RTE_LOG_REGISTER(dpaa_logtype_pmd, "pmd.net.dpaa", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); +RTE_LOG_REGISTER(dpaa_logtype_eventdev, "pmd.event.dpaa", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index a2f4825..21488b1 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -646,10 +646,5 @@ struct rte_fslmc_bus rte_fslmc_bus = { RTE_REGISTER_BUS(FSLMC_BUS_NAME, rte_fslmc_bus.bus); -RTE_INIT(fslmc_init_log) -{ - /* Bus level logs */ - dpaa2_logtype_bus = rte_log_register("bus.fslmc"); - if (dpaa2_logtype_bus >= 0) - rte_log_set_level(dpaa2_logtype_bus, RTE_LOG_NOTICE); -} +RTE_LOG_REGISTER(dpaa2_logtype_bus, "bus.fslmc", + RTE_LOG_NOTICE, RTE_LOGTYPE_EAL); diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c index dfd6b1f..3458aac 100644 --- a/drivers/bus/ifpga/ifpga_bus.c +++ b/drivers/bus/ifpga/ifpga_bus.c @@ -474,9 +474,5 @@ static struct rte_bus rte_ifpga_bus = { RTE_REGISTER_BUS(IFPGA_BUS_NAME, rte_ifpga_bus); -RTE_INIT(ifpga_init_log) -{ - ifpga_bus_logtype = rte_log_register("bus.ifpga"); - if (ifpga_bus_logtype >= 0) - rte_log_set_level(ifpga_bus_logtype, RTE_LOG_NOTICE); -} +RTE_LOG_REGISTER(ifpga_bus_logtype, "bus.ifpga", + RTE_LOG_NOTICE, RTE_LOGTYPE_EAL); diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index a89ea23..b16e5a1 100644 --- a/drivers/bus/vdev/vdev.c +++ b/drivers/bus/vdev/vdev.c @@ -558,9 +558,5 @@ static struct rte_bus rte_vdev_bus = { RTE_REGISTER_BUS(vdev, rte_vdev_bus); -RTE_INIT(vdev_init_log) -{ - vdev_logtype_bus = rte_log_register("bus.vdev"); - if (vdev_logtype_bus >= 0) - rte_log_set_level(vdev_logtype_bus, RTE_LOG_NOTICE); -} +RTE_LOG_REGISTER(vdev_logtype_bus, "bus.vdev", + RTE_LOG_NOTICE, RTE_LOGTYPE_EAL); diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c index 48a219f..ff05e54 100644 --- a/drivers/bus/vmbus/vmbus_common.c +++ b/drivers/bus/vmbus/vmbus_common.c @@ -299,9 +299,5 @@ struct rte_vmbus_bus rte_vmbus_bus = { RTE_REGISTER_BUS(vmbus, rte_vmbus_bus.bus); -RTE_INIT(vmbus_init_log) -{ - vmbus_logtype_bus = rte_log_register("bus.vmbus"); - if (vmbus_logtype_bus >= 0) - rte_log_set_level(vmbus_logtype_bus, RTE_LOG_NOTICE); -} +RTE_LOG_REGISTER(vmbus_logtype_bus, "bus.vmbus", + RTE_LOG_NOTICE, RTE_LOGTYPE_EAL); -- 1.8.3.1