Skip to content

Commit a064068

Browse files
edumazetkuba-moo
authored andcommitted
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. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250203151152.3163876-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 546d983 commit a064068

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

net/core/neighbour.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -832,12 +832,10 @@ static int pneigh_ifdown_and_unlock(struct neigh_table *tbl,
832832
return -ENOENT;
833833
}
834834

835-
static void neigh_parms_destroy(struct neigh_parms *parms);
836-
837835
static inline void neigh_parms_put(struct neigh_parms *parms)
838836
{
839837
if (refcount_dec_and_test(&parms->refcnt))
840-
neigh_parms_destroy(parms);
838+
kfree(parms);
841839
}
842840

843841
/*
@@ -1713,11 +1711,6 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms)
17131711
}
17141712
EXPORT_SYMBOL(neigh_parms_release);
17151713

1716-
static void neigh_parms_destroy(struct neigh_parms *parms)
1717-
{
1718-
kfree(parms);
1719-
}
1720-
17211714
static struct lock_class_key neigh_table_proxy_queue_class;
17221715

17231716
static struct neigh_table __rcu *neigh_tables[NEIGH_NR_TABLES] __read_mostly;

0 commit comments

Comments
 (0)