[PATCH 3/9] netconsole: move refill_skbs_work_handler() from netpoll
From: Breno Leitao
Date: Sun May 24 2026 - 12:14:45 EST
The work handler is wired via INIT_WORK() in
netconsole_skb_pool_init() and has no other callers since the
previous patch took the skb pool lifecycle out of __netpoll_setup().
Move the function body into drivers/net/netconsole.c as a
file-static helper, drop EXPORT_SYMBOL_GPL() and remove the
prototype from <linux/netpoll.h>.
Pure code motion: the body is unchanged and still calls the
exported refill_skbs() in net/core/netpoll.c.
Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
---
drivers/net/netconsole.c | 8 ++++++++
include/linux/netpoll.h | 1 -
net/core/netpoll.c | 9 ---------
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index b84de3ba44c3..3d7d17c59902 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -283,6 +283,14 @@ static bool bound_by_mac(struct netconsole_target *nt)
return is_valid_ether_addr(nt->np.dev_mac);
}
+static void refill_skbs_work_handler(struct work_struct *work)
+{
+ struct netpoll *np =
+ container_of(work, struct netpoll, refill_wq);
+
+ refill_skbs(np);
+}
+
/* Initialise the per-target skb pool that find_skb() falls back to and
* seed it. Pair with netconsole_skb_pool_flush() at the matching
* netpoll teardown.
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 9fa4deed0bff..1a497d12f336 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -75,7 +75,6 @@ void do_netpoll_cleanup(struct netpoll *np);
netdev_tx_t netpoll_send_skb(struct netpoll *np, struct sk_buff *skb);
void netpoll_zap_completion_queue(void);
void refill_skbs(struct netpoll *np);
-void refill_skbs_work_handler(struct work_struct *work);
void skb_pool_flush(struct netpoll *np);
#ifdef CONFIG_NETPOLL
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index a4d176ff9376..4111d6ee8d4b 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -367,15 +367,6 @@ void skb_pool_flush(struct netpoll *np)
}
EXPORT_SYMBOL_GPL(skb_pool_flush);
-void refill_skbs_work_handler(struct work_struct *work)
-{
- struct netpoll *np =
- container_of(work, struct netpoll, refill_wq);
-
- refill_skbs(np);
-}
-EXPORT_SYMBOL_GPL(refill_skbs_work_handler);
-
int __netpoll_setup(struct netpoll *np, struct net_device *ndev)
{
struct netpoll_info *npinfo;
--
2.54.0