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 4351AA04DB; Thu, 10 Dec 2020 00:58:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 56ADBCA54; Thu, 10 Dec 2020 00:54:22 +0100 (CET) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id 4BCE1C9D3 for ; Thu, 10 Dec 2020 00:54:14 +0100 (CET) Received: by mail-pg1-f193.google.com with SMTP id t37so2448935pga.7 for ; Wed, 09 Dec 2020 15:54:14 -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=oRBXLLMAXHRJUivCRFVN3zkQHbqJ69HaN+q2Bg49BS0JV+bzyeRhZFQUU8E2zAg7D9 nj3wgi/BjKhfdH1onUnajVQTbBmw2g0rsB9yxAkTYf87buxjw2+CBp9hSMKrNz7/P1U+ c1rQ3Esz7Gr7fS39IzMn+f7Wuk3q/6An8jbHBKvHbGKCHxTsg7wExBkSKXVYHOtQkG8z QhuwBvA0V9D9hM+0X4DWM6GyCTOaAUnlUMI75lXICXXdm6rLgo4scKaGiL/C+9qkW2xL fEk9wenAFqvDE0ZjhBNfa2KP8YCWZJtIX4jBpQKwUY4OcrJh6UYMI9oEyrw4GYfREaWe 6VsA== 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=LNDzj+rXPTB1HuUzHuupDwPkLaKWPGDLnYmbqRF64ruceE+m7P7tOjHzVU8mUGx/c3 XcqGiOjKfJTYlmqUkQQEJGJjnnyhpWF7woEQTDC32+Xu4yJFGoT55CGVtWOqP624nVNh //cIDCqiZlPB5Mnt/liPSdLMxP83xamCfUCJmyT2/pgvrighVmOye+PY55boHS0M0lOq aSc7IZOOQzc/ZsEb5eNh6w1/TBZES1TWhUOKOMRzJH6Oziq+Ps/yZ9Crgx+9lgm0b4Hr hZJDUR/SCJwvd5jKBU+xUehB6HdMHolOkvqo28r9MSGvkCqKzPST+B/+kSa3zt/RnM+y J+Jw== X-Gm-Message-State: AOAM532FHlrEJBM2k9/6dc6M1KK+WxjhZa5GgLZefNUaJfLAWYBbfLV8 1rD1j/JwxpQLv+X4L/MvnXICmHRU0O+N0J5k X-Google-Smtp-Source: ABdhPJySc0pbEcnyN7AqrCrqHNBKLyK4bfNfbObPtX4rahXsrOORagc9AQQGRUNuzcAiGkcWfmSCoA== X-Received: by 2002:a17:90b:19d2:: with SMTP id nm18mr4575540pjb.159.1607558053224; Wed, 09 Dec 2020 15:54:13 -0800 (PST) Received: from localhost.localdomain ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id s7sm4047693pfh.207.2020.12.09.15.54.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Dec 2020 15:54:12 -0800 (PST) From: Ajit Khaparde X-Google-Original-From: Ajit Khaparde To: dev@dpdk.org Date: Wed, 9 Dec 2020 15:53:45 -0800 Message-Id: <20201209235347.16180-16-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20201209235347.16180-1-ajit.khaparde@broadcom.com> References: <20201209192233.6518-1-ajit.khaparde@broadcom.com> <20201209235347.16180-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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)