[PATCH] raw/cnxk_bphy: switch to dynamic logging

David Marchand david.marchand at redhat.com
Fri Nov 24 08:56:56 CET 2023


Hello,

On Tue, Nov 14, 2023 at 9:05 AM Tomasz Duszynski <tduszynski at marvell.com> wrote:
[snip]
> @@ -15,6 +16,11 @@
>  #include "cnxk_bphy_irq.h"
>  #include "rte_pmd_bphy.h"
>
> +extern int bphy_rawdev_logtype;
> +
> +#define BPHY_LOG(level, fmt, args...) \
> +       rte_log(RTE_LOG_ ## level, bphy_rawdev_logtype, "%s(): " fmt "\n", __func__, ##args)
> +
>  static const struct rte_pci_id pci_bphy_map[] = {
>         {RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CNXK_BPHY)},
>         {
> @@ -81,7 +87,7 @@ bphy_rawdev_selftest(uint16_t dev_id)
>                 goto err_desc;
>         if (descs != 1) {
>                 ret = -ENODEV;
> -               plt_err("Wrong number of descs reported\n");
> +               BPHY_LOG(ERR, "Wrong number of descs reported\n");

I think it is the only occurence in this patch, please remove trailing
\n since BPHY_LOG appends one.
Thanks.


-- 
David Marchand



More information about the dev mailing list