kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] octeontx2-af: Add a 'rvu_free_bitmap()' function
@ 2021-09-04  7:34 Christophe JAILLET
  2021-09-04  7:34 ` [PATCH 2/2] octeontx2-af: Fix some memory leaks in the error handling path of 'cgx_lmac_init()' Christophe JAILLET
  2021-09-04 12:10 ` [PATCH 1/2] octeontx2-af: Add a 'rvu_free_bitmap()' function patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2021-09-04  7:34 UTC (permalink / raw)
  To: sgoutham, lcherian, gakula, jerinj, hkelam, sbhatta, davem, kuba, skori
  Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET

In order to match 'rvu_alloc_bitmap()', add a 'rvu_free_bitmap()' function

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 5 +++++
 drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index 72de4eca6f67..35836903b7fb 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -211,6 +211,11 @@ int rvu_alloc_bitmap(struct rsrc_bmap *rsrc)
 	return 0;
 }
 
+void rvu_free_bitmap(struct rsrc_bmap *rsrc)
+{
+	kfree(rsrc->bmap);
+}
+
 /* Get block LF's HW index from a PF_FUNC's block slot number */
 int rvu_get_lf(struct rvu *rvu, struct rvu_block *block, u16 pcifunc, u16 slot)
 {
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
index d38e5c980c30..1d9411232f1d 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
@@ -638,6 +638,7 @@ static inline bool is_rvu_fwdata_valid(struct rvu *rvu)
 }
 
 int rvu_alloc_bitmap(struct rsrc_bmap *rsrc);
+void rvu_free_bitmap(struct rsrc_bmap *rsrc);
 int rvu_alloc_rsrc(struct rsrc_bmap *rsrc);
 void rvu_free_rsrc(struct rsrc_bmap *rsrc, int id);
 bool is_rsrc_free(struct rsrc_bmap *rsrc, int id);
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-04 12:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-04  7:34 [PATCH 1/2] octeontx2-af: Add a 'rvu_free_bitmap()' function Christophe JAILLET
2021-09-04  7:34 ` [PATCH 2/2] octeontx2-af: Fix some memory leaks in the error handling path of 'cgx_lmac_init()' Christophe JAILLET
2021-09-04 12:10 ` [PATCH 1/2] octeontx2-af: Add a 'rvu_free_bitmap()' function patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).