summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2026-03-14 12:43:10 +0300
committerJakub Kicinski <kuba@kernel.org>2026-03-18 06:32:09 +0300
commit337191f37748ee9cf986c8154d32209241495d8b (patch)
tree48cf260842f601f7a2fd41738e90e737587a5e9e
parenta32734d25d870e4b6d3a9de87dd6e82b27c6d914 (diff)
downloadlinux-337191f37748ee9cf986c8154d32209241495d8b.tar.xz
net: stmmac: simplify stmmac_set_queue_rx_buf_size()
Clean up the new stmmac_set_queue_rx_buf_size() to simplify the code. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1w1LWY-0000000DGSd-49H6@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 8a149fdc45d0..dacca3189a63 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -399,16 +399,12 @@ static void stmmac_set_queue_rx_buf_size(struct stmmac_priv *priv,
{
u32 buf_size;
- if (rx_q->xsk_pool && rx_q->buf_alloc_num) {
+ if (rx_q->xsk_pool && rx_q->buf_alloc_num)
buf_size = xsk_pool_get_rx_frame_size(rx_q->xsk_pool);
- stmmac_set_dma_bfsize(priv, priv->ioaddr,
- buf_size,
- rx_q->queue_index);
- } else {
- stmmac_set_dma_bfsize(priv, priv->ioaddr,
- priv->dma_conf.dma_buf_sz,
- rx_q->queue_index);
- }
+ else
+ buf_size = priv->dma_conf.dma_buf_sz;
+
+ stmmac_set_dma_bfsize(priv, priv->ioaddr, buf_size, rx_q->queue_index);
}
/**