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 E6564A2F63 for ; Fri, 4 Oct 2019 07:02:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 80E471C199; Fri, 4 Oct 2019 07:02:55 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (unknown [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 7C0691C1A4 for ; Fri, 4 Oct 2019 07:02:54 +0200 (CEST) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id CA7FE30C2BC; Thu, 3 Oct 2019 22:01:33 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com CA7FE30C2BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1570165293; bh=bSLPl+CONo1dup+cVr7H/F5PU1xQCcNiPSVJRhaa+Uk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OdF6JWmFj9y5UCfLxypuhhWztT/vHv1xfUEXMMYTfrq2/cSt/p3vmvvl/6zhqonOC ODle2/FfvRqsSfGJtyEqJGSpXBecDNliyBdD5sbE4HS16cb/tNHm2eo451MOUh0srz Fc8fhnUDkzBJKczWqviVDMTEhMSstrIxLxkQPNUw= Received: from localhost.localdomain (unknown [10.230.30.225]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 73A9914008B; Thu, 3 Oct 2019 22:02:49 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kalesh AP , Somnath Kotur , Santoshkumar Karanappa Rastapur Date: Thu, 3 Oct 2019 22:02:37 -0700 Message-Id: <20191004050246.90165-2-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20191004050246.90165-1-ajit.khaparde@broadcom.com> References: <20191004050246.90165-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 01/10] net/bnxt: change return value of few routines 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" From: Kalesh AP Change bnxt_init_nic() and bnxt_init_ring_grps() to void functions as these can never fail. Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Santoshkumar Karanappa Rastapur --- drivers/net/bnxt/bnxt_ethdev.c | 13 +++---------- drivers/net/bnxt/bnxt_ring.c | 4 +--- drivers/net/bnxt/bnxt_ring.h | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 5160ac002b..533c6a07fd 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -518,20 +518,13 @@ static int bnxt_shutdown_nic(struct bnxt *bp) return 0; } -static int bnxt_init_nic(struct bnxt *bp) +static void bnxt_init_nic(struct bnxt *bp) { - int rc; - - if (BNXT_HAS_RING_GRPS(bp)) { - rc = bnxt_init_ring_grps(bp); - if (rc) - return rc; - } + if (BNXT_HAS_RING_GRPS(bp)) + bnxt_init_ring_grps(bp); bnxt_init_vnics(bp); bnxt_init_filters(bp); - - return 0; } /* diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index 19fc45395d..0ee31ed4e8 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -39,15 +39,13 @@ void bnxt_free_ring(struct bnxt_ring *ring) * Ring groups */ -int bnxt_init_ring_grps(struct bnxt *bp) +void bnxt_init_ring_grps(struct bnxt *bp) { unsigned int i; for (i = 0; i < bp->max_ring_grps; i++) memset(&bp->grp_info[i], (uint8_t)HWRM_NA_SIGNATURE, sizeof(struct bnxt_ring_grp_info)); - - return 0; } int bnxt_alloc_ring_grps(struct bnxt *bp) diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h index 833118391b..645dcf0e87 100644 --- a/drivers/net/bnxt/bnxt_ring.h +++ b/drivers/net/bnxt/bnxt_ring.h @@ -65,7 +65,7 @@ struct bnxt_tx_ring_info; struct bnxt_rx_ring_info; struct bnxt_cp_ring_info; void bnxt_free_ring(struct bnxt_ring *ring); -int bnxt_init_ring_grps(struct bnxt *bp); +void bnxt_init_ring_grps(struct bnxt *bp); int bnxt_alloc_ring_grps(struct bnxt *bp); int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx, struct bnxt_tx_queue *txq, -- 2.20.1 (Apple Git-117)