mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
net: macb: move ring size computation to functions
[ Upstream commit92d4256faf] The tx/rx ring size calculation is somewhat complex and partially hidden behind a macro. Move that out of the {RX,TX}_RING_BYTES() macros and macb_{alloc,free}_consistent() functions into neat separate functions. In macb_free_consistent(), we drop the size variable and directly call the size helpers in the arguments list. In macb_alloc_consistent(), we keep the size variable that is used by netdev_dbg() calls. Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250923-macb-fixes-v6-3-772d655cdeb6@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of:78d901897b("net: macb: single dma_alloc_coherent() for DMA descriptors") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f786bdf0fc
commit
d8d1601b3f
1 changed files with 16 additions and 11 deletions
Loading…
Add table
Add a link
Reference in a new issue