Nothing is fixed here, just reuse the value coming from the build framework rather than use a fixed string that may get wrong in the future.
Signed-off-by: David Marchand <david.march...@redhat.com> --- drivers/net/sfc/sfc_log.h | 7 ++----- drivers/vdpa/sfc/sfc_vdpa_log.h | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/net/sfc/sfc_log.h b/drivers/net/sfc/sfc_log.h index 10a9ce6ced..b92b358927 100644 --- a/drivers/net/sfc/sfc_log.h +++ b/drivers/net/sfc/sfc_log.h @@ -13,9 +13,6 @@ /** Generic driver log type */ extern int sfc_logtype_driver; -/** Common log type name prefix */ -#define SFC_LOGTYPE_PREFIX "pmd.net.sfc." - /** Log PMD generic message, add a prefix and a line break */ #define SFC_GENERIC_LOG(level, ...) \ rte_log(RTE_LOG_ ## level, sfc_logtype_driver, \ @@ -23,10 +20,10 @@ extern int sfc_logtype_driver; RTE_FMT_TAIL(__VA_ARGS__ ,))) /** Name prefix for the per-device log type used to report basic information */ -#define SFC_LOGTYPE_MAIN_STR SFC_LOGTYPE_PREFIX "main" +#define SFC_LOGTYPE_MAIN_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main" /** Device MCDI log type name prefix */ -#define SFC_LOGTYPE_MCDI_STR SFC_LOGTYPE_PREFIX "mcdi" +#define SFC_LOGTYPE_MCDI_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi" #define SFC_LOG_PREFIX_MAX 32 diff --git a/drivers/vdpa/sfc/sfc_vdpa_log.h b/drivers/vdpa/sfc/sfc_vdpa_log.h index 6c0101dbb4..1104e7de43 100644 --- a/drivers/vdpa/sfc/sfc_vdpa_log.h +++ b/drivers/vdpa/sfc/sfc_vdpa_log.h @@ -8,9 +8,6 @@ /** Generic driver log type */ extern int sfc_vdpa_logtype_driver; -/** Common log type name prefix */ -#define SFC_VDPA_LOGTYPE_PREFIX "pmd.vdpa.sfc." - /** Log PMD generic message, add a prefix and a line break */ #define SFC_VDPA_GENERIC_LOG(level, ...) \ rte_log(RTE_LOG_ ## level, sfc_vdpa_logtype_driver, \ @@ -18,10 +15,10 @@ extern int sfc_vdpa_logtype_driver; RTE_FMT_TAIL(__VA_ARGS__ ,))) /** Name prefix for the per-device log type used to report basic information */ -#define SFC_VDPA_LOGTYPE_MAIN_STR SFC_VDPA_LOGTYPE_PREFIX "main" +#define SFC_VDPA_LOGTYPE_MAIN_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main" /** Device MCDI log type name prefix */ -#define SFC_VDPA_LOGTYPE_MCDI_STR SFC_VDPA_LOGTYPE_PREFIX "mcdi" +#define SFC_VDPA_LOGTYPE_MCDI_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi" #define SFC_VDPA_LOG_PREFIX_MAX 32 -- 2.46.0