neighbour: remove neigh_parms_destroy()
Subsystems (2)
PATCH 1/1 neighbour: remove neigh_parms_destroy()
neigh_parms_destroy() is a simple kfree(), no need for a forward declaration.
neigh_parms_put() can instead call kfree() directly.
--- net/core/neighbour.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
net/core/neighbour.c +1 -8
@@ -832,12 +832,10 @@ static int pneigh_ifdown_and_unlock(struct neigh_table *tbl,return -ENOENT ; } -static void neigh_parms_destroy (struct neigh_parms *parms); -static inline void neigh_parms_put (struct neigh_parms *parms) {if (refcount_dec_and_test (&parms->refcnt)) -neigh_parms_destroy (parms); +kfree (parms); }/*
@@ -1713,11 +1711,6 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms) }EXPORT_SYMBOL (neigh_parms_release); -static void neigh_parms_destroy (struct neigh_parms *parms) -{ -kfree (parms); -} -static struct lock_class_key neigh_table_proxy_queue_class;static struct neigh_table __rcu *neigh_tables[NEIGH_NR_TABLES ]__read_mostly ;
Signature · 1 line
2.48.1.362.g079036d154-goog
Quoted 6 lines · Eric Dumazet
neigh_parms_destroy()is a simplekfree(), no need for a forward declaration.
neigh_parms_put()can instead callkfree()directly.Signed-off-by Eric Dumazet <[email protected]>
Thanks Eric,
I agree that this is the case. And I think it has been so since commit efd7ef1c1929 ("net: Kill hold_net release_net"). Or, IOW, for about 10 years by now.
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 3 Feb 2025 15:11:52 +0000 you wrote:
neigh_parms_destroy()is a simplekfree(), no need for a forward declaration.
neigh_parms_put()can instead callkfree()directly.Signed-off-by Eric Dumazet <[email protected]>[...]
Here is the summary with links:
- [net-next] neighbour: remove neigh_parms_destroy()
https://git.kernel.org/netdev/net-next/c/a064068bb6be
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html