Skip to content

Commit 2604c45

Browse files
shemmingerdavid-marchand
authored andcommitted
common/sfc_efx: remove use of PMD logtype
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 <[email protected]>
1 parent a247fcd commit 2604c45

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

drivers/common/sfc_efx/sfc_efx.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "sfc_efx_log.h"
1616
#include "sfc_efx.h"
1717

18-
uint32_t sfc_efx_logtype;
18+
int sfc_efx_logtype;
1919

2020
static int
2121
sfc_efx_kvarg_dev_class_handler(__rte_unused const char *key,
@@ -117,11 +117,4 @@ sfc_efx_family(struct rte_pci_device *pci_dev,
117117
return rc;
118118
}
119119

120-
RTE_INIT(sfc_efx_register_logtype)
121-
{
122-
int ret;
123-
124-
ret = rte_log_register_type_and_pick_level("pmd.common.sfc_efx",
125-
RTE_LOG_NOTICE);
126-
sfc_efx_logtype = (ret < 0) ? RTE_LOGTYPE_PMD : ret;
127-
}
120+
RTE_LOG_REGISTER_DEFAULT(sfc_efx_logtype, NOTICE);

drivers/common/sfc_efx/sfc_efx_log.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define _SFC_EFX_LOG_H_
1212

1313
/** Generic driver log type */
14-
extern uint32_t sfc_efx_logtype;
14+
extern int sfc_efx_logtype;
1515

1616
/** Log message, add a prefix and a line break */
1717
#define SFC_EFX_LOG(level, ...) \

0 commit comments

Comments
 (0)