eal: remove redundant error output
diff mbox series

Message ID 20190820233330.27474-1-stephen@networkplumber.org
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • eal: remove redundant error output
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues
ci/iol-Compile-Testing success Compile Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS

Commit Message

Stephen Hemminger Aug. 20, 2019, 11:33 p.m. UTC
The function rte_eal_init_alert ends up printing the same message
twice. Once via RTE_LOG and once to stderr. Remove the fprintf
to stderr since it is redundant.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_eal/linux/eal/eal.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Aaron Conole Aug. 21, 2019, 1:04 p.m. UTC | #1
Stephen Hemminger <stephen@networkplumber.org> writes:

> The function rte_eal_init_alert ends up printing the same message
> twice. Once via RTE_LOG and once to stderr. Remove the fprintf
> to stderr since it is redundant.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---

This was originally added at your suggestion:

http://mails.dpdk.org/archives/dev/2017-January/056431.html

Because sometimes we have these alerts before logging is up (so the
RTE_LOG(...) won't show up, I gather).

Is it possible to have an either/or?

>  lib/librte_eal/linux/eal/eal.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
> index 946222ccdb7a..076fb3cbde5f 100644
> --- a/lib/librte_eal/linux/eal/eal.c
> +++ b/lib/librte_eal/linux/eal/eal.c
> @@ -949,7 +949,6 @@ static int rte_eal_vfio_setup(void)
>  
>  static void rte_eal_init_alert(const char *msg)
>  {
> -	fprintf(stderr, "EAL: FATAL: %s\n", msg);
>  	RTE_LOG(ERR, EAL, "%s\n", msg);
>  }

Patch
diff mbox series

diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
index 946222ccdb7a..076fb3cbde5f 100644
--- a/lib/librte_eal/linux/eal/eal.c
+++ b/lib/librte_eal/linux/eal/eal.c
@@ -949,7 +949,6 @@  static int rte_eal_vfio_setup(void)
 
 static void rte_eal_init_alert(const char *msg)
 {
-	fprintf(stderr, "EAL: FATAL: %s\n", msg);
 	RTE_LOG(ERR, EAL, "%s\n", msg);
 }