Skip to contentSkip to conversation

net: stmmac: Unexport stmmac_rx_offset() from stmmac.h

PATCH Applied Furong Xu 3 participants 3 messages Jan 7, 2025 – Jan 9, 2025

Subsystems (4)
lore
Share & tools
lore

Furong Xu

author
#0 lore raw

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
index b8d631e559c0..548b28fed9b6 100644
@@ -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
index 2f518ec845ec..24cc39d8edbd 100644
@@ -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
Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Furong Xu

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.

Andrew

#2 lore raw
In reply to Furong Xu
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 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.

[...]

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