Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] net: phylink: fix function name in phylink_replay_link_end() kernel-doc
@ 2026-11-29 16:00 Julius Bairaktaris
  2026-11-29 16:20 ` Andrew Lunn
  2026-12-02  3:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Julius Bairaktaris @ 2026-11-29 16:00 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Vladimir Oltean, Christian Marangi, netdev

The kernel-doc of phylink_replay_link_end() says that it must be called
within the same rtnl_lock() critical section as a previous
phylink_replay_link_start(). No such function exists. The helper that
starts the replay is phylink_replay_link_begin(), and
phylink_replay_link_end() warns when it is called without a prior
phylink_replay_link_begin().

The wrong name came with commit 96969b132bf1 ("net: phylink: introduce
helpers for replaying link callbacks").

Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
---

Notes:
    The kernel-doc of phylink_replay_link_begin() also names a
    pcs_link_down() method of the split PCS, which struct phylink_pcs_ops
    does not have. That sentence is left as it is: "net: phylink: add
    .pcs_link_down PCS OP" in the fwnode PCS series adds the op and calls it
    from phylink_link_down() [1].
    
    Found by reading the code while porting OpenWrt to v7.4.
    I used Claude (Anthropic) to help write these patches.
    
    [1] https://lore.kernel.org/netdev/20261117123956.11981-13-ansuelsmth@gmail.com/

 drivers/net/phy/phylink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index d1f1142a98a..6f5af388210 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -4648,7 +4648,7 @@ EXPORT_SYMBOL_GPL(phylink_replay_link_begin);
  * the phylib PHY.
  *
  * One must call this method only within the same rtnl_lock() critical section
- * as a previous phylink_replay_link_start().
+ * as a previous phylink_replay_link_begin().
  */
 void phylink_replay_link_end(struct phylink *pl)
 {

base-commit: f89726ffabef1b08c52e6163b7ab94b0d5f15503
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-02  3:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 16:00 [PATCH net-next] net: phylink: fix function name in phylink_replay_link_end() kernel-doc Julius Bairaktaris
2026-11-29 16:20 ` Andrew Lunn
2026-12-02  3:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox