From: Stephen Hemminger Date: Sat, 14 Feb 2015 15:32:58 +0000 (-0500) Subject: enic: replace use of printf with log X-Git-Tag: spdx-start~9592 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=518b590803b9253cd881fc40f59e61dc768aacd3;p=dpdk.git enic: replace use of printf with log Device driver should log via DPDK log, not to printf which is sends to /dev/null in a daemon application. Signed-off-by: Stephen Hemminger Acked-by: Neil Horman Acked-by: David Marchand [Thomas: include rte_log.h] Signed-off-by: Thomas Monjalon --- diff --git a/lib/librte_pmd_enic/enic_compat.h b/lib/librte_pmd_enic/enic_compat.h index b1af838d27..67c092d212 100644 --- a/lib/librte_pmd_enic/enic_compat.h +++ b/lib/librte_pmd_enic/enic_compat.h @@ -41,6 +41,7 @@ #include #include +#include #define ENIC_PAGE_ALIGN 4096ULL #define ENIC_ALIGN ENIC_PAGE_ALIGN @@ -75,10 +76,13 @@ #define kzalloc(size, flags) calloc(1, size) #define kfree(x) free(x) -#define dev_err(x, args...) printf("rte_enic_pmd : Error - " args) -#define dev_info(x, args...) printf("rte_enic_pmd: Info - " args) -#define dev_warning(x, args...) printf("rte_enic_pmd: Warning - " args) -#define dev_trace(x, args...) printf("rte_enic_pmd: Trace - " args) +#define dev_printk(level, fmt, args...) \ + RTE_LOG(level, PMD, "rte_enic_pmd: " fmt, ## args) + +#define dev_err(x, args...) dev_printk(ERR, args) +#define dev_info(x, args...) dev_printk(INFO, args) +#define dev_warning(x, args...) dev_printk(WARNING, args) +#define dev_debug(x, args...) dev_printk(DEBUG, args) #define __le16 u16 #define __le32 u32