public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] octeontx2-af: CGX: replace kfree() with rvu_free_bitmap()
@ 2026-02-25  8:23 Bo Sun
  2026-02-25  9:23 ` Jijie Shao
  2026-02-27  2:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Bo Sun @ 2026-02-25  8:23 UTC (permalink / raw)
  To: netdev, kuba, vadim.fedorenko
  Cc: pabeni, jerinj, lcherian, sgoutham, gakula, sbhatta, hkelam,
	andrew+netdev, davem, edumazet, linux-kernel, Bo Sun

mac_to_index_bmap is allocated with rvu_alloc_bitmap(), so free it
with rvu_free_bitmap() instead of open-coding kfree(.bmap) to keep
the alloc/free API pairing consistent.

Signed-off-by: Bo Sun <bo@mboxify.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
---
 drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
index 6000795823a3..4f33a816bc7a 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
@@ -1822,7 +1822,7 @@ static int cgx_lmac_exit(struct cgx *cgx)
 			continue;
 		cgx->mac_ops->mac_pause_frm_config(cgx, lmac->lmac_id, false);
 		cgx_configure_interrupt(cgx, lmac, lmac->lmac_id, true);
-		kfree(lmac->mac_to_index_bmap.bmap);
+		rvu_free_bitmap(&lmac->mac_to_index_bmap);
 		rvu_free_bitmap(&lmac->rx_fc_pfvf_bmap);
 		rvu_free_bitmap(&lmac->tx_fc_pfvf_bmap);
 		kfree(lmac->name);

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

* Re: [PATCH net-next] octeontx2-af: CGX: replace kfree() with rvu_free_bitmap()
  2026-02-25  8:23 [PATCH net-next] octeontx2-af: CGX: replace kfree() with rvu_free_bitmap() Bo Sun
@ 2026-02-25  9:23 ` Jijie Shao
  2026-02-27  2:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jijie Shao @ 2026-02-25  9:23 UTC (permalink / raw)
  To: Bo Sun, netdev, kuba, vadim.fedorenko
  Cc: shaojijie, pabeni, jerinj, lcherian, sgoutham, gakula, sbhatta,
	hkelam, andrew+netdev, davem, edumazet, linux-kernel


on 2026/2/25 16:23, Bo Sun wrote:
> mac_to_index_bmap is allocated with rvu_alloc_bitmap(), so free it
> with rvu_free_bitmap() instead of open-coding kfree(.bmap) to keep
> the alloc/free API pairing consistent.

Reviewed-by: Jijie Shao <shaojijie@huawei.com>

>
> Signed-off-by: Bo Sun <bo@mboxify.com>
> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
> ---
>   drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> index 6000795823a3..4f33a816bc7a 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> @@ -1822,7 +1822,7 @@ static int cgx_lmac_exit(struct cgx *cgx)
>   			continue;
>   		cgx->mac_ops->mac_pause_frm_config(cgx, lmac->lmac_id, false);
>   		cgx_configure_interrupt(cgx, lmac, lmac->lmac_id, true);
> -		kfree(lmac->mac_to_index_bmap.bmap);
> +		rvu_free_bitmap(&lmac->mac_to_index_bmap);
>   		rvu_free_bitmap(&lmac->rx_fc_pfvf_bmap);
>   		rvu_free_bitmap(&lmac->tx_fc_pfvf_bmap);
>   		kfree(lmac->name);
>
>

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

* Re: [PATCH net-next] octeontx2-af: CGX: replace kfree() with rvu_free_bitmap()
  2026-02-25  8:23 [PATCH net-next] octeontx2-af: CGX: replace kfree() with rvu_free_bitmap() Bo Sun
  2026-02-25  9:23 ` Jijie Shao
@ 2026-02-27  2:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-27  2:00 UTC (permalink / raw)
  To: Bo Sun
  Cc: netdev, kuba, vadim.fedorenko, pabeni, jerinj, lcherian, sgoutham,
	gakula, sbhatta, hkelam, andrew+netdev, davem, edumazet,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 25 Feb 2026 16:23:48 +0800 you wrote:
> mac_to_index_bmap is allocated with rvu_alloc_bitmap(), so free it
> with rvu_free_bitmap() instead of open-coding kfree(.bmap) to keep
> the alloc/free API pairing consistent.
> 
> Signed-off-by: Bo Sun <bo@mboxify.com>
> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
> 
> [...]

Here is the summary with links:
  - [net-next] octeontx2-af: CGX: replace kfree() with rvu_free_bitmap()
    https://git.kernel.org/netdev/net-next/c/f22b4e6fbba5

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



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

end of thread, other threads:[~2026-02-27  2:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25  8:23 [PATCH net-next] octeontx2-af: CGX: replace kfree() with rvu_free_bitmap() Bo Sun
2026-02-25  9:23 ` Jijie Shao
2026-02-27  2:00 ` 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