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 6D7CBA09E9; Tue, 8 Dec 2020 21:16:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 45498CA44; Tue, 8 Dec 2020 21:12:09 +0100 (CET) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by dpdk.org (Postfix) with ESMTP id 10C35CA10 for ; Tue, 8 Dec 2020 21:12:01 +0100 (CET) Received: by mail-pl1-f194.google.com with SMTP id t6so1998549plq.1 for ; Tue, 08 Dec 2020 12:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version; bh=q98UclreYG7/cFVKdOiXiuLbuVJ0SjBnT4fJKUWPY5A=; b=Gu/RoMk3MB36r+/cd4NPGKCjR9FIute/y3MDhu6hopZ6fTTtqxMgc1sFdGLYk3stiI s0ltjp2SDAL1I2Oc4z27TbiLh7IpSnMqXW+dC++eNzV2rWNPunqxlH3zBYzwNB1rXSGC WEeCVc5WAgAZKsTDa8wn5cwpHfP63lX8LyIrE= 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; bh=q98UclreYG7/cFVKdOiXiuLbuVJ0SjBnT4fJKUWPY5A=; b=XNwfVX4fIHvEeffOu2b54RT12Cg01h3K5x0P8jhWJzTfcMYGljexT5YVvynehDSPOq /gjqoqXNnQpCFKas8q0ejSLPljJXjv+NSL/FZ15rdR14RkS19ne5zDLv1FV/FgaeU+WG z4lIb09otafFbAgVxQweOq1UsvF5MgesOOoHWZSs6iW82OJJRO7IgFvCVULZE9dMwndt 5iLCGJ+Ek0KscW+ZJuBmoeNCxroI2n0I349BJdkIBxrJtNCRebUrK90AJwY+/c3r8q7N S6VOlSR/ZgY5GMHdE/d7y7N+hVTdwrAIlfB6bwJNnhU0WEe1jdksioyoKo3iC1mGKR44 Wp6Q== X-Gm-Message-State: AOAM532fVWTt2SJEKtZLDCUVYa277jRaR/uuatFn3B4Hl0x/s2qK/Q9k PAHmPzU/9bYHtdeFP54Tvph61mXFbPFRXPuZUnJXjXsX7H2asZbeIkcamKoBLQ+bABPMiq9SOQi T39GOJUlO7HiMSIFEK4Mpg5VPMRue5h3tgLF6b1xyYab2z1o8M69Q3VhrVPc2Ru3uPg== X-Google-Smtp-Source: ABdhPJykwmfQ3Acwu0X5BatzC1Wqwm/GVEdfyS2u/GFN1zPqwvW47Yhid50IvATpbp2waQ3b5xVgsA== X-Received: by 2002:a17:902:ff0e:b029:da:d4ee:eca3 with SMTP id f14-20020a170902ff0eb02900dad4eeeca3mr20364134plj.41.1607458319810; Tue, 08 Dec 2020 12:11:59 -0800 (PST) Received: from localhost.localdomain ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x10sm5729187pfc.157.2020.12.08.12.11.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2020 12:11:58 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Date: Tue, 8 Dec 2020 12:11:32 -0800 Message-Id: <20201208201134.47844-16-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20201208201134.47844-1-ajit.khaparde@broadcom.com> References: <20201208201134.47844-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] [PATCH 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) -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.