From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8338BA04DB; Wed, 9 Dec 2020 20:27:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3B497CA50; Wed, 9 Dec 2020 20:23:08 +0100 (CET) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 3036ECA16 for ; Wed, 9 Dec 2020 20:23:00 +0100 (CET) Received: by mail-pf1-f196.google.com with SMTP id w6so1685988pfu.1 for ; Wed, 09 Dec 2020 11:23:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=VyA3/SlRtTbtFeEbm3PQMKzw+mHwXjPVof6WYYEqWjc=; b=SAZJ3bZNKs1T7bTpnYeY/NbZw6h5MniIzw5fvyVNsPjTZfm5rjDOqZVVbd0in29/ZC XzAruAY/cdn/hxzLF1+Vloj8cfkmL4xyVfSBz5kbFafjjXGy6Tk90hRmbHYUV6WuWCoQ u2KQQjcXJCXUFVzP7UJFGytX+hg/yrzAwEbg+QfsfuKX52KgZbLKyD+NqjVinIhM68+m xkm9uoh6TOQaYzuhPWEylENXaUQ7tCd4/gjvoW2nZv5EBEAF93m8H0fvxS/Z1F8ZLSNu bwVcCJCs2jBgGk7PGdelZiEmJlWYEXbUx2ablqg8BTtelCDPFvWw5bwWez+VCZZjohSk mBXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VyA3/SlRtTbtFeEbm3PQMKzw+mHwXjPVof6WYYEqWjc=; b=pTqKYpEdu3P332gi5cx8PwMHnWs9/QHLj0/8U+jbBrVRC6+bDah/nDHQEoMj9IUYrg AmJ+YW/SB+3Srq8VwW+rspigysUaSRTU3vKkk+BACSZxscEuze43Zfu5z6LxM87+gHvO gHRNY3cncVqpZWf99a9EkHHH+R4rBhEa8ngNsvy6qx2k4BLhqebSv1WdJzIWmwoUUA/t BOnphs8fpnajCnWdO/ouomCYCelg85SEGhhofbgDbgqWzHkPjm2XnazTiFTDsBe0sLyD +aD0XfEGhTxh79rhCZfrFO/0Cqvourpz5YhJtYt4pDk/6Ajvd5IYqsSi8UCY7iDY4WO6 sEAA== X-Gm-Message-State: AOAM5318SbOM02AbqPzlklQv7S3L1NYnfdAeBxU3ZnF4NKaA9wSIQL+8 GuYjvcFbqZKz5KwKdHExqclMZbG6KhPQAaF8 X-Google-Smtp-Source: ABdhPJxdNajD+No5ShjrAx8qe8qVwt8rX3JbRVN0uPbD2b7cugIRldcnvRmGX4mxyALKSOjkVDtw3g== X-Received: by 2002:a17:90a:2e84:: with SMTP id r4mr3553716pjd.147.1607541778124; Wed, 09 Dec 2020 11:22:58 -0800 (PST) Received: from localhost.localdomain ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id y1sm3342449pfe.80.2020.12.09.11.22.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Dec 2020 11:22:57 -0800 (PST) From: Ajit Khaparde X-Google-Original-From: Ajit Khaparde To: dev@dpdk.org Date: Wed, 9 Dec 2020 11:22:31 -0800 Message-Id: <20201209192233.6518-16-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20201209192233.6518-1-ajit.khaparde@broadcom.com> References: <20201209192233.6518-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 15/17] net/bnxt: changes to indentation and coding style X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Indentation and coding style fixes. Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt.h | 4 ++-- drivers/net/bnxt/bnxt_ethdev.c | 9 ++++----- drivers/net/bnxt/bnxt_reps.c | 2 +- drivers/net/bnxt/bnxt_ring.c | 3 +-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 2a318efaf..556e99203 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -127,9 +127,9 @@ */ #ifdef RTE_EXEC_ENV_FREEBSD /* In FreeBSD OS, nic_uio driver does not support interrupts */ -#define BNXT_NUM_ASYNC_CPR(bp) 0 +#define BNXT_NUM_ASYNC_CPR(bp) 0U #else -#define BNXT_NUM_ASYNC_CPR(bp) 1 +#define BNXT_NUM_ASYNC_CPR(bp) 1U #endif #define BNXT_MISC_VEC_ID RTE_INTR_VEC_ZERO_OFFSET diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 21d9e26ca..9d5c8aa0f 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1264,11 +1264,10 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) return -EINVAL; } - if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS) { + if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS) PMD_DRV_LOG(ERR, - "RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n", - bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS); - } + "RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n", + bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS); do { rc = bnxt_hwrm_if_change(bp, true); @@ -1622,7 +1621,7 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete) out: /* Timed out or success */ if (new.link_status != eth_dev->data->dev_link.link_status || - new.link_speed != eth_dev->data->dev_link.link_speed) { + new.link_speed != eth_dev->data->dev_link.link_speed) { rte_eth_linkstatus_set(eth_dev, &new); rte_eth_dev_callback_process(eth_dev, diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c index 167c46ad4..12d677d32 100644 --- a/drivers/net/bnxt/bnxt_reps.c +++ b/drivers/net/bnxt/bnxt_reps.c @@ -56,7 +56,7 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf) /* Put this mbuf on the RxQ of the Representor */ prod_rx_buf = &rep_rxr->rx_buf_ring[rep_rxr->rx_prod & mask]; - if (!*prod_rx_buf) { + if (*prod_rx_buf == NULL) { *prod_rx_buf = mbuf; vfr_bp->rx_bytes[que] += mbuf->pkt_len; vfr_bp->rx_pkts[que]++; diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index 579c48d8c..f83bcaba2 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -599,8 +599,7 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index) if (rxq->rx_started) { if (bnxt_init_one_rx_ring(rxq)) { - PMD_DRV_LOG(ERR, - "bnxt_init_one_rx_ring failed!\n"); + PMD_DRV_LOG(ERR, "bnxt_init_one_rx_ring failed!\n"); bnxt_rx_queue_release_op(rxq); rc = -ENOMEM; goto err_out; -- 2.21.1 (Apple Git-122.3)