From: David Ahern <dsah...@gmail.com> There are no more direct references to arp_hashfn so fold it into arp_hash, the hash callback for arp.
Signed-off-by: David Ahern <dsah...@gmail.com> --- include/net/arp.h | 8 -------- net/ipv4/arp.c | 5 ++++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/net/arp.h b/include/net/arp.h index a5091f13cd3e..9f433c077b67 100644 --- a/include/net/arp.h +++ b/include/net/arp.h @@ -10,14 +10,6 @@ extern struct neigh_table arp_tbl; -static inline u32 arp_hashfn(const void *pkey, const struct net_device *dev, u32 *hash_rnd) -{ - u32 key = *(const u32 *)pkey; - u32 val = key ^ hash32_ptr(dev); - - return val * hash_rnd[0]; -} - static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key) { if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 850a6f13a082..6b88211287ae 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -213,7 +213,10 @@ static u32 arp_hash(const void *pkey, const struct net_device *dev, __u32 *hash_rnd) { - return arp_hashfn(pkey, dev, hash_rnd); + u32 key = *(const u32 *)pkey; + u32 val = key ^ hash32_ptr(dev); + + return val * hash_rnd[0]; } static bool arp_key_eq(const struct neighbour *neigh, const void *pkey) -- 2.11.0