common/mlx5: remove extra line feed in log messages
authorThomas Monjalon <thomas@monjalon.net>
Tue, 9 Mar 2021 09:48:35 +0000 (10:48 +0100)
committerRaslan Darawsheh <rasland@nvidia.com>
Mon, 15 Mar 2021 13:30:57 +0000 (14:30 +0100)
The macro DRV_LOG already includes a terminating line feed character
defined in PMD_DRV_LOG_.
The extra line feeds added in some messages are removed.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/common/mlx5/mlx5_common_pci.c
drivers/common/mlx5/mlx5_devx_cmds.c
drivers/compress/mlx5/mlx5_compress.c
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/windows/mlx5_os.c
drivers/vdpa/mlx5/mlx5_vdpa.c

index 2b65768..a7f541a 100644 (file)
@@ -245,14 +245,14 @@ drivers_probe(struct mlx5_pci_device *dev, struct rte_pci_driver *pci_drv,
                already_loaded = dev->classes_loaded & driver->driver_class;
                if (already_loaded &&
                    !(driver->pci_driver.drv_flags & RTE_PCI_DRV_PROBE_AGAIN)) {
-                       DRV_LOG(ERR, "Device %s is already probed\n",
+                       DRV_LOG(ERR, "Device %s is already probed",
                                pci_dev->device.name);
                        ret = -EEXIST;
                        goto probe_err;
                }
                ret = driver->pci_driver.probe(pci_drv, pci_dev);
                if (ret < 0) {
-                       DRV_LOG(ERR, "Failed to load driver = %s.\n",
+                       DRV_LOG(ERR, "Failed to load driver %s",
                                driver->pci_driver.driver.name);
                        goto probe_err;
                }
index 0060c37..8df14f5 100644 (file)
@@ -275,7 +275,7 @@ mlx5_devx_cmd_mkey_create(void *ctx,
        mkey->obj = mlx5_glue->devx_obj_create(ctx, in, in_size_dw * 4, out,
                                               sizeof(out));
        if (!mkey->obj) {
-               DRV_LOG(ERR, "Can't create %sdirect mkey - error %d\n",
+               DRV_LOG(ERR, "Can't create %sdirect mkey - error %d",
                        klm_num ? "an in" : "a ", errno);
                rte_errno = errno;
                mlx5_free(mkey);
index 46255ab..85238ac 100644 (file)
@@ -257,7 +257,7 @@ mlx5_compress_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
                DRV_LOG(ERR, "Can't change SQ state to ready.");
                goto err;
        }
-       DRV_LOG(INFO, "QP %u: SQN=0x%X CQN=0x%X entries num = %u\n",
+       DRV_LOG(INFO, "QP %u: SQN=0x%X CQN=0x%X entries num = %u",
                (uint32_t)qp_id, qp->sq.sq->id, qp->cq.cq->id, qp->entries_n);
        return 0;
 err:
index 92fa178..1217b51 100644 (file)
@@ -1244,14 +1244,14 @@ err_secondary:
                if (config->hca_attr.log_max_ft_sampler_num > 0  &&
                    config->dv_flow_en) {
                        priv->sampler_en = 1;
-                       DRV_LOG(DEBUG, "The Sampler enabled!\n");
+                       DRV_LOG(DEBUG, "Sampler enabled!");
                } else {
                        priv->sampler_en = 0;
                        if (!config->hca_attr.log_max_ft_sampler_num)
-                               DRV_LOG(WARNING, "No available register for"
-                                               " Sampler.");
+                               DRV_LOG(WARNING,
+                                       "No available register for sampler.");
                        else
-                               DRV_LOG(DEBUG, "DV flow is not supported!\n");
+                               DRV_LOG(DEBUG, "DV flow is not supported!");
                }
 #endif
        }
index ab5be3d..773f3e6 100644 (file)
@@ -7924,7 +7924,7 @@ void mlx5_release_tunnel_hub(struct mlx5_dev_ctx_shared *sh, uint16_t port_id)
        if (!thub)
                return;
        if (!LIST_EMPTY(&thub->tunnels))
-               DRV_LOG(WARNING, "port %u tunnels present\n", port_id);
+               DRV_LOG(WARNING, "port %u tunnels present", port_id);
        mlx5_hlist_destroy(thub->groups);
        mlx5_free(thub);
 }
index e37cc65..e7db85b 100644 (file)
@@ -165,7 +165,7 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
        if (!sh->flow_tbls)
                err = mlx5_alloc_table_hash_list(priv);
        else
-               DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse\n",
+               DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse",
                        (void *)sh->flow_tbls);
        return err;
 }
index 4c2d886..5755a68 100644 (file)
@@ -751,7 +751,7 @@ mlx5_vdpa_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
        priv->pci_dev = pci_dev;
        priv->var = mlx5_glue->dv_alloc_var(ctx, 0);
        if (!priv->var) {
-               DRV_LOG(ERR, "Failed to allocate VAR %u.\n", errno);
+               DRV_LOG(ERR, "Failed to allocate VAR %u.", errno);
                goto error;
        }
        priv->vdev = rte_vdpa_register_device(&pci_dev->device,