net: stmmac: Unexport stmmac_rx_offset() from stmmac.h
Subsystems (4)
PATCH v2 1/1 net: stmmac: Unexport stmmac_rx_offset() from stmmac.h
stmmac_rx_offset() is referenced in stmmac_main.c only, let's move it to stmmac_main.c.
Drop the inline keyword by the way, it is better to let the compiler to decide.
Compile tested only.
No functional change intended.
---
V1 -> V2: Drop the inline keyword (Andrew Lunn)
V1: https://lore.kernel.org/r/[email protected]
--- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 8 -------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac.h +0 -8
@@ -416,14 +416,6 @@ static inline bool stmmac_xdp_is_enabled(struct stmmac_priv *priv)return !!priv->xdp_prog; } -static inline unsigned int stmmac_rx_offset (struct stmmac_priv *priv) -{ -if (stmmac_xdp_is_enabled (priv)) -return XDP_PACKET_HEADROOM ; - -return 0 ; -} -void stmmac_disable_rx_queue (struct stmmac_priv *priv,u32 queue);void stmmac_enable_rx_queue (struct stmmac_priv *priv,u32 queue);void stmmac_disable_tx_queue (struct stmmac_priv *priv,u32 queue);
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +8 -0
@@ -1315,6 +1315,14 @@ static void stmmac_display_rings(struct stmmac_priv *priv,stmmac_display_tx_rings (priv, dma_conf); } +static unsigned int stmmac_rx_offset (struct stmmac_priv *priv) +{ +if (stmmac_xdp_is_enabled (priv)) +return XDP_PACKET_HEADROOM ; + +return 0 ; +} +static int stmmac_set_bfsize (int mtu,int bufsize) {int ret = bufsize;
Signature · 1 line
2.34.1
Quoted 10 lines · Furong Xu
stmmac_rx_offset()is referenced instmmac_main.conly, let's move it tostmmac_main.c.Drop the inline keyword by the way, it is better to let the compiler to decide.
Compile tested only.
No functional change intended.Signed-off-by Furong Xu <[email protected]>
Andrew
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 10 lines · On Tue, 7 Jan 2025 15:54:48 +0800 you wrote:
stmmac_rx_offset()is referenced instmmac_main.conly, let's move it tostmmac_main.c.Drop the inline keyword by the way, it is better to let the compiler to decide.
Compile tested only.
No functional change intended.[...]
Here is the summary with links:
- [net-next,v2] net: stmmac: Unexport stmmac_rx_offset() from stmmac.h
https://git.kernel.org/netdev/net-next/c/e62de01008bd
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html