* [PATCH net-next v1] net: stmmac: Unexport stmmac_rx_offset() from stmmac.h
@ 2025-01-06 6:28 Furong Xu
2025-01-06 21:05 ` Andrew Lunn
0 siblings, 1 reply; 2+ messages in thread
From: Furong Xu @ 2025-01-06 6:28 UTC (permalink / raw)
To: netdev, linux-stm32, linux-arm-kernel, linux-kernel
Cc: Alexandre Torgue, Jose Abreu, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin, xfr,
Furong Xu
stmmac_rx_offset() is referenced in stmmac_main.c only,
let's move it to stmmac_main.c.
Compile tested only.
No functional change intended.
Signed-off-by: Furong Xu <0x1207@gmail.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 8 --------
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++++++
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index b8d631e559c0..548b28fed9b6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -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);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 99eaec8bac4a..37b21d2d6f4b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1308,6 +1308,14 @@ static void stmmac_display_rings(struct stmmac_priv *priv,
stmmac_display_tx_rings(priv, dma_conf);
}
+static inline 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;
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v1] net: stmmac: Unexport stmmac_rx_offset() from stmmac.h
2025-01-06 6:28 [PATCH net-next v1] net: stmmac: Unexport stmmac_rx_offset() from stmmac.h Furong Xu
@ 2025-01-06 21:05 ` Andrew Lunn
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2025-01-06 21:05 UTC (permalink / raw)
To: Furong Xu
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
Alexandre Torgue, Jose Abreu, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin, xfr
> +static inline unsigned int stmmac_rx_offset(struct stmmac_priv *priv)
> +{
> + if (stmmac_xdp_is_enabled(priv))
> + return XDP_PACKET_HEADROOM;
> +
> + return 0;
> +}
Please drop the inline keyword. You don't need it in a .c file, it is
better to let the compiler to decide.
Andrew
---
pw-bot: cr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-06 21:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-06 6:28 [PATCH net-next v1] net: stmmac: Unexport stmmac_rx_offset() from stmmac.h Furong Xu
2025-01-06 21:05 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®