octeontx2-af: Add a 'rvu_free_bitmap()' function
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 4 Sep 2021 07:34:41 +0000 (09:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Sep 2021 12:07:00 +0000 (13:07 +0100)
In order to match 'rvu_alloc_bitmap()', add a 'rvu_free_bitmap()' function

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
drivers/net/ethernet/marvell/octeontx2/af/rvu.h

index 72de4ec..3583690 100644 (file)
@@ -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)
 {
index d38e5c9..1d94112 100644 (file)
@@ -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);