From: Thomas Monjalon Date: Thu, 30 Jul 2015 18:03:19 +0000 (+0200) Subject: log: use simple macro X-Git-Tag: spdx-start~8589 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d43777cb150867ebc9db4ca06977d52e854e3869;p=dpdk.git log: use simple macro For consistency, RTE_LOG macro should be used instead of rte_log function. The macro can be pruned at build time, though these logs have a high level and should not pruned. Signed-off-by: Thomas Monjalon --- diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 912012b184..2f205ea72e 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1710,9 +1710,8 @@ main(int argc, char **argv) /* init power management library */ ret = rte_power_init(lcore_id); if (ret) - rte_log(RTE_LOG_ERR, RTE_LOGTYPE_POWER, - "Power management library initialization " - "failed on core%u", lcore_id); + RTE_LOG(ERR, POWER, + "Library initialization failed on core %u\n", lcore_id); /* init timer structures for each enabled lcore */ rte_timer_init(&power_timers[lcore_id]); diff --git a/lib/librte_eal/common/eal_common_tailqs.c b/lib/librte_eal/common/eal_common_tailqs.c index d9551cdc48..bb08ec8b9e 100644 --- a/lib/librte_eal/common/eal_common_tailqs.c +++ b/lib/librte_eal/common/eal_common_tailqs.c @@ -150,7 +150,7 @@ int rte_eal_tailq_register(struct rte_tailq_elem *t) { if (rte_eal_tailq_local_register(t) < 0) { - rte_log(RTE_LOG_ERR, RTE_LOGTYPE_EAL, + RTE_LOG(ERR, EAL, "%s tailq is already registered\n", t->name); goto error; } @@ -160,7 +160,7 @@ rte_eal_tailq_register(struct rte_tailq_elem *t) if (rte_tailqs_count >= 0) { rte_eal_tailq_update(t); if (t->head == NULL) { - rte_log(RTE_LOG_ERR, RTE_LOGTYPE_EAL, + RTE_LOG(ERR, EAL, "Cannot initialize tailq: %s\n", t->name); TAILQ_REMOVE(&rte_tailq_elem_head, t, next); goto error; @@ -186,7 +186,7 @@ rte_eal_tailqs_init(void) * rte_eal_tailq_register and EAL_REGISTER_TAILQ */ rte_eal_tailq_update(t); if (t->head == NULL) { - rte_log(RTE_LOG_ERR, RTE_LOGTYPE_EAL, + RTE_LOG(ERR, EAL, "Cannot initialize tailq: %s\n", t->name); /* no need to TAILQ_REMOVE, we are going to panic in * rte_eal_init() */