diff mbox series

[1/2] octeontx2-af: Add a 'rvu_free_bitmap()' function

Message ID 37f3e7e21a1c0f29244b807e5b995b2abeec6c3e.1630738450.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State Accepted
Commit d863ca67bb6e40b7653e25f3787994281b8c2e58
Delegated to: Netdev Maintainers
Headers show
Series [1/2] octeontx2-af: Add a 'rvu_free_bitmap()' function | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 18 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 5 this patch: 5
netdev/header_inline success Link

Commit Message

Christophe JAILLET Sept. 4, 2021, 7:34 a.m. UTC
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(+)

Comments

patchwork-bot+netdevbpf@kernel.org Sept. 4, 2021, 12:10 p.m. UTC | #1
Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Sat,  4 Sep 2021 09:34:41 +0200 you wrote:
> 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(+)

Here is the summary with links:
  - [1/2] octeontx2-af: Add a 'rvu_free_bitmap()' function
    https://git.kernel.org/netdev/net/c/d863ca67bb6e
  - [2/2] octeontx2-af: Fix some memory leaks in the error handling path of 'cgx_lmac_init()'
    https://git.kernel.org/netdev/net/c/ecbd690b52dc

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

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);