Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

octeontx2-af: CGX: replace kfree() with rvu_free_bitmap()

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>
Reviewed-by: Jijie Shao <shaojijie@huawei.com>
Link: https://patch.msgid.link/20260225082348.2519131-1-bo@mboxify.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Bo Sun and committed by
Jakub Kicinski
f22b4e6f d68d21ea

+1 -1
+1 -1
drivers/net/ethernet/marvell/octeontx2/af/cgx.c
··· 1822 1822 continue; 1823 1823 cgx->mac_ops->mac_pause_frm_config(cgx, lmac->lmac_id, false); 1824 1824 cgx_configure_interrupt(cgx, lmac, lmac->lmac_id, true); 1825 - kfree(lmac->mac_to_index_bmap.bmap); 1825 + rvu_free_bitmap(&lmac->mac_to_index_bmap); 1826 1826 rvu_free_bitmap(&lmac->rx_fc_pfvf_bmap); 1827 1827 rvu_free_bitmap(&lmac->tx_fc_pfvf_bmap); 1828 1828 kfree(lmac->name);