netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] neighbour: remove neigh_parms_destroy()
@ 2025-02-03 15:11 Eric Dumazet
  2025-02-04  9:47 ` Simon Horman
  2025-02-04 22:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2025-02-03 15:11 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, Simon Horman, eric.dumazet, Eric Dumazet

neigh_parms_destroy() is a simple kfree(), no need for
a forward declaration.

neigh_parms_put() can instead call kfree() directly.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/core/neighbour.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 89656d180bc60c57516d56be69774ed0c7b352b2..73260ca0fc22317e096ff5f17519e117f41ea48f 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -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;
-- 
2.48.1.362.g079036d154-goog


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

* Re: [PATCH net-next] neighbour: remove neigh_parms_destroy()
  2025-02-03 15:11 [PATCH net-next] neighbour: remove neigh_parms_destroy() Eric Dumazet
@ 2025-02-04  9:47 ` Simon Horman
  2025-02-04 22:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-02-04  9:47 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, netdev,
	eric.dumazet

On Mon, Feb 03, 2025 at 03:11:52PM +0000, Eric Dumazet wrote:
> neigh_parms_destroy() is a simple kfree(), no need for
> a forward declaration.
> 
> neigh_parms_put() can instead call kfree() directly.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

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.

Reviewed-by: Simon Horman <horms@kernel.org>

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

* Re: [PATCH net-next] neighbour: remove neigh_parms_destroy()
  2025-02-03 15:11 [PATCH net-next] neighbour: remove neigh_parms_destroy() Eric Dumazet
  2025-02-04  9:47 ` Simon Horman
@ 2025-02-04 22:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-04 22:20 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: davem, kuba, pabeni, netdev, horms, eric.dumazet

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon,  3 Feb 2025 15:11:52 +0000 you wrote:
> neigh_parms_destroy() is a simple kfree(), no need for
> a forward declaration.
> 
> neigh_parms_put() can instead call kfree() directly.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-02-04 22:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-03 15:11 [PATCH net-next] neighbour: remove neigh_parms_destroy() Eric Dumazet
2025-02-04  9:47 ` Simon Horman
2025-02-04 22:20 ` 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;
as well as URLs for NNTP newsgroup(s).