From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ajit Khaparde Subject: [PATCH 15/31] net/bnxt: code cleanup style of bnxt txq Date: Tue, 19 Jun 2018 14:30:42 -0700 Message-ID: <20180619213058.12273-16-ajit.khaparde@broadcom.com> References: <20180619213058.12273-1-ajit.khaparde@broadcom.com> Cc: ferruh.yigit@intel.com, Scott Branden To: dev@dpdk.org Return-path: Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id BC1571B05E for ; Tue, 19 Jun 2018 23:31:09 +0200 (CEST) In-Reply-To: <20180619213058.12273-1-ajit.khaparde@broadcom.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Scott Branden Cleanup alignment, brackets, debug string style of bnxt_txq Signed-off-by: Scott Branden Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_txq.c | 24 ++++++++++++++---------- drivers/net/bnxt/bnxt_txq.h | 9 +++++---- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c index b9b975e4c..677bb9692 100644 --- a/drivers/net/bnxt/bnxt_txq.c +++ b/drivers/net/bnxt/bnxt_txq.c @@ -74,10 +74,10 @@ void bnxt_tx_queue_release_op(void *tx_queue) } int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, - uint16_t queue_idx, - uint16_t nb_desc, - unsigned int socket_id, - const struct rte_eth_txconf *tx_conf) + uint16_t queue_idx, + uint16_t nb_desc, + unsigned int socket_id, + const struct rte_eth_txconf *tx_conf) { struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; struct bnxt_tx_queue *txq; @@ -91,7 +91,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, } if (!nb_desc || nb_desc > MAX_TX_DESC_CNT) { - PMD_DRV_LOG(ERR, "nb_desc %d is invalid", nb_desc); + PMD_DRV_LOG(ERR, "nb_desc %d is invalid\n", nb_desc); rc = -EINVAL; goto out; } @@ -106,7 +106,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, txq = rte_zmalloc_socket("bnxt_tx_queue", sizeof(struct bnxt_tx_queue), RTE_CACHE_LINE_SIZE, socket_id); if (!txq) { - PMD_DRV_LOG(ERR, "bnxt_tx_queue allocation failed!"); + PMD_DRV_LOG(ERR, "bnxt_tx_queue allocation failed!\n"); rc = -ENOMEM; goto out; } @@ -122,16 +122,20 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, txq->port_id = eth_dev->data->port_id; /* Allocate TX ring hardware descriptors */ - if (bnxt_alloc_rings(bp, queue_idx, txq, NULL, txq->cp_ring, - "txr")) { - PMD_DRV_LOG(ERR, "ring_dma_zone_reserve for tx_ring failed!"); + if (bnxt_alloc_rings(bp, + queue_idx, + txq, + NULL, + txq->cp_ring, + "txr")) { + PMD_DRV_LOG(ERR, "ring_dma_zone_reserve for tx_ring failed!\n"); bnxt_tx_queue_release_op(txq); rc = -ENOMEM; goto out; } if (bnxt_init_one_tx_ring(txq)) { - PMD_DRV_LOG(ERR, "bnxt_init_one_tx_ring failed!"); + PMD_DRV_LOG(ERR, "bnxt_init_one_tx_ring failed!\n"); bnxt_tx_queue_release_op(txq); rc = -ENOMEM; goto out; diff --git a/drivers/net/bnxt/bnxt_txq.h b/drivers/net/bnxt/bnxt_txq.h index f2c712a75..9da8f39d8 100644 --- a/drivers/net/bnxt/bnxt_txq.h +++ b/drivers/net/bnxt/bnxt_txq.h @@ -40,8 +40,9 @@ void bnxt_free_txq_stats(struct bnxt_tx_queue *txq); void bnxt_free_tx_mbufs(struct bnxt *bp); void bnxt_tx_queue_release_op(void *tx_queue); int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, - uint16_t queue_idx, - uint16_t nb_desc, - unsigned int socket_id, - const struct rte_eth_txconf *tx_conf); + uint16_t queue_idx, + uint16_t nb_desc, + unsigned int socket_id, + const struct rte_eth_txconf *tx_conf); + #endif -- 2.15.1 (Apple Git-101)