The CDEV_LOG_* macros already add a '\n' at the end of
the line. Remove it from format strings to avoid duplicated
newlines.

Signed-off-by: Olivier Matz <olivier.m...@6wind.com>
---
 lib/cryptodev/cryptodev_pmd.c |  4 ++--
 lib/cryptodev/cryptodev_pmd.h |  2 +-
 lib/cryptodev/rte_cryptodev.c | 26 +++++++++++++-------------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index d90b2570b1..77b269f312 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -99,11 +99,11 @@ rte_cryptodev_pmd_create(const char *name,
        struct rte_cryptodev *cryptodev;
 
        if (params->name[0] != '\0') {
-               CDEV_LOG_INFO("User specified device name = %s\n", 
params->name);
+               CDEV_LOG_INFO("User specified device name = %s", params->name);
                name = params->name;
        }
 
-       CDEV_LOG_INFO("Creating cryptodev %s\n", name);
+       CDEV_LOG_INFO("Creating cryptodev %s", name);
 
        CDEV_LOG_INFO("Initialisation parameters - name: %s,"
                        "socket id: %d, max queue pairs: %u",
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 96d7e225b0..09ba952455 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -652,7 +652,7 @@ set_sym_session_private_data(struct 
rte_cryptodev_sym_session *sess,
                uint8_t driver_id, void *private_data)
 {
        if (unlikely(sess->nb_drivers <= driver_id)) {
-               CDEV_LOG_ERR("Set private data for driver %u not allowed\n",
+               CDEV_LOG_ERR("Set private data for driver %u not allowed",
                                driver_id);
                return;
        }
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 5e25e607fa..05d6aa793f 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -1235,13 +1235,13 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t 
queue_pair_id,
        }
 
        if (!qp_conf) {
-               CDEV_LOG_ERR("qp_conf cannot be NULL\n");
+               CDEV_LOG_ERR("qp_conf cannot be NULL");
                return -EINVAL;
        }
 
        if ((qp_conf->mp_session && !qp_conf->mp_session_private) ||
                        (!qp_conf->mp_session && qp_conf->mp_session_private)) {
-               CDEV_LOG_ERR("Invalid mempools\n");
+               CDEV_LOG_ERR("Invalid mempools");
                return -EINVAL;
        }
 
@@ -1254,7 +1254,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t 
queue_pair_id,
                pool_priv = rte_mempool_get_priv(qp_conf->mp_session);
                if (!pool_priv || qp_conf->mp_session->private_data_size <
                                sizeof(*pool_priv)) {
-                       CDEV_LOG_ERR("Invalid mempool\n");
+                       CDEV_LOG_ERR("Invalid mempool");
                        return -EINVAL;
                }
 
@@ -1265,7 +1265,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t 
queue_pair_id,
                        obj_size) || (s.nb_drivers <= dev->driver_id) ||
                        rte_cryptodev_sym_get_private_session_size(dev_id) >
                                obj_priv_size) {
-                       CDEV_LOG_ERR("Invalid mempool\n");
+                       CDEV_LOG_ERR("Invalid mempool");
                        return -EINVAL;
                }
        }
@@ -1787,7 +1787,7 @@ rte_cryptodev_sym_session_pool_create(const char *name, 
uint32_t nb_elts,
 
        obj_sz = rte_cryptodev_sym_get_header_session_size() + user_data_size;
        if (obj_sz > elt_size)
-               CDEV_LOG_INFO("elt_size %u is expanded to %u\n", elt_size,
+               CDEV_LOG_INFO("elt_size %u is expanded to %u", elt_size,
                                obj_sz);
        else
                obj_sz = elt_size;
@@ -1797,14 +1797,14 @@ rte_cryptodev_sym_session_pool_create(const char *name, 
uint32_t nb_elts,
                        NULL, NULL, NULL, NULL,
                        socket_id, 0);
        if (mp == NULL) {
-               CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d\n",
+               CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d",
                        __func__, name, rte_errno);
                return NULL;
        }
 
        pool_priv = rte_mempool_get_priv(mp);
        if (!pool_priv) {
-               CDEV_LOG_ERR("%s(name=%s) failed to get private data\n",
+               CDEV_LOG_ERR("%s(name=%s) failed to get private data",
                        __func__, name);
                rte_mempool_free(mp);
                return NULL;
@@ -1835,7 +1835,7 @@ rte_cryptodev_asym_session_pool_create(const char *name, 
uint32_t nb_elts,
                                max_priv_sz = priv_sz;
                }
        if (max_priv_sz == 0) {
-               CDEV_LOG_INFO("Could not set max private session size\n");
+               CDEV_LOG_INFO("Could not set max private session size");
                return NULL;
        }
 
@@ -1848,14 +1848,14 @@ rte_cryptodev_asym_session_pool_create(const char 
*name, uint32_t nb_elts,
                        NULL, NULL, NULL, NULL,
                        socket_id, 0);
        if (mp == NULL) {
-               CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d\n",
+               CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d",
                        __func__, name, rte_errno);
                return NULL;
        }
 
        pool_priv = rte_mempool_get_priv(mp);
        if (!pool_priv) {
-               CDEV_LOG_ERR("%s(name=%s) failed to get private data\n",
+               CDEV_LOG_ERR("%s(name=%s) failed to get private data",
                        __func__, name);
                rte_mempool_free(mp);
                return NULL;
@@ -1902,7 +1902,7 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
        struct rte_cryptodev_sym_session_pool_private_data *pool_priv;
 
        if (!rte_cryptodev_sym_is_valid_session_pool(mp)) {
-               CDEV_LOG_ERR("Invalid mempool\n");
+               CDEV_LOG_ERR("Invalid mempool");
                return NULL;
        }
 
@@ -1952,7 +1952,7 @@ rte_cryptodev_asym_session_create(uint8_t dev_id,
                return -EINVAL;
 
        if (!mp) {
-               CDEV_LOG_ERR("invalid mempool\n");
+               CDEV_LOG_ERR("invalid mempool");
                return -EINVAL;
        }
 
@@ -2404,7 +2404,7 @@ rte_crypto_op_pool_create(const char *name, enum 
rte_crypto_op_type type,
                elt_size += RTE_MAX(sizeof(struct rte_crypto_sym_op),
                                    sizeof(struct rte_crypto_asym_op));
        } else {
-               CDEV_LOG_ERR("Invalid op_type\n");
+               CDEV_LOG_ERR("Invalid op_type");
                return NULL;
        }
 
-- 
2.30.2

Reply via email to