[01/10] net/bnxt: change return value of few routines
diff mbox series

Message ID 20191004050246.90165-2-ajit.khaparde@broadcom.com
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • bnxt patchset with bug fixes
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ajit Khaparde Oct. 4, 2019, 5:02 a.m. UTC
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

Change bnxt_init_nic() and bnxt_init_ring_grps() to void functions
as these can never fail.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
---
 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(-)

Patch
diff mbox series

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,