[v5,02/18] common/sfc_efx: remove use of PMD logtype
Checks
Commit Message
This code was implemented in a slightly different manner
than all the other logging code (for no good reason).
Make it the same and handle errors in same way as
other drivers.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/sfc_efx/sfc_efx.c | 11 ++---------
drivers/common/sfc_efx/sfc_efx_log.h | 2 +-
2 files changed, 3 insertions(+), 10 deletions(-)
@@ -15,7 +15,7 @@
#include "sfc_efx_log.h"
#include "sfc_efx.h"
-uint32_t sfc_efx_logtype;
+int sfc_efx_logtype;
static int
sfc_efx_kvarg_dev_class_handler(__rte_unused const char *key,
@@ -117,11 +117,4 @@ sfc_efx_family(struct rte_pci_device *pci_dev,
return rc;
}
-RTE_INIT(sfc_efx_register_logtype)
-{
- int ret;
-
- ret = rte_log_register_type_and_pick_level("pmd.common.sfc_efx",
- RTE_LOG_NOTICE);
- sfc_efx_logtype = (ret < 0) ? RTE_LOGTYPE_PMD : ret;
-}
+RTE_LOG_REGISTER_DEFAULT(sfc_efx_logtype, NOTICE);
@@ -11,7 +11,7 @@
#define _SFC_EFX_LOG_H_
/** Generic driver log type */
-extern uint32_t sfc_efx_logtype;
+extern int sfc_efx_logtype;
/** Log message, add a prefix and a line break */
#define SFC_EFX_LOG(level, ...) \