Skip to content

Commit e62de01

Browse files
Furong XuPaolo Abeni
authored andcommitted
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. Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20250107075448.4039925-1-0x1207@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent b11bff9 commit e62de01

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,6 @@ static inline bool stmmac_xdp_is_enabled(struct stmmac_priv *priv)
416416
return !!priv->xdp_prog;
417417
}
418418

419-
static inline unsigned int stmmac_rx_offset(struct stmmac_priv *priv)
420-
{
421-
if (stmmac_xdp_is_enabled(priv))
422-
return XDP_PACKET_HEADROOM;
423-
424-
return 0;
425-
}
426-
427419
void stmmac_disable_rx_queue(struct stmmac_priv *priv, u32 queue);
428420
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue);
429421
void stmmac_disable_tx_queue(struct stmmac_priv *priv, u32 queue);

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,6 +1315,14 @@ static void stmmac_display_rings(struct stmmac_priv *priv,
13151315
stmmac_display_tx_rings(priv, dma_conf);
13161316
}
13171317

1318+
static unsigned int stmmac_rx_offset(struct stmmac_priv *priv)
1319+
{
1320+
if (stmmac_xdp_is_enabled(priv))
1321+
return XDP_PACKET_HEADROOM;
1322+
1323+
return 0;
1324+
}
1325+
13181326
static int stmmac_set_bfsize(int mtu, int bufsize)
13191327
{
13201328
int ret = bufsize;

0 commit comments

Comments
 (0)