Netdev List
 help / color / mirror / Atom feed
* [PATCH net] ipv4: Define __ipv4_neigh_lookup_noref when CONFIG_INET is disabled
@ 2019-05-05 18:16 David Ahern
  2019-05-05 18:26 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2019-05-05 18:16 UTC (permalink / raw)
  To: davem; +Cc: netdev, David Ahern

From: David Ahern <dsahern@gmail.com>

Define __ipv4_neigh_lookup_noref to return NULL when CONFIG_INET is disabled.

Fixes: 4b2a2bfeb3f0 ("neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
---
 include/net/arp.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/net/arp.h b/include/net/arp.h
index 977aabfcdc03..c8f580a0e6b1 100644
--- a/include/net/arp.h
+++ b/include/net/arp.h
@@ -18,6 +18,7 @@ static inline u32 arp_hashfn(const void *pkey, const struct net_device *dev, u32
 	return val * hash_rnd[0];
 }
 
+#ifdef CONFIG_INET
 static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key)
 {
 	if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT))
@@ -25,6 +26,13 @@ static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev
 
 	return ___neigh_lookup_noref(&arp_tbl, neigh_key_eq32, arp_hashfn, &key, dev);
 }
+#else
+static inline
+struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key)
+{
+	return NULL;
+}
+#endif
 
 static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32 key)
 {
-- 
2.11.0


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

* Re: [PATCH net] ipv4: Define __ipv4_neigh_lookup_noref when CONFIG_INET is disabled
  2019-05-05 18:16 [PATCH net] ipv4: Define __ipv4_neigh_lookup_noref when CONFIG_INET is disabled David Ahern
@ 2019-05-05 18:26 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-05-05 18:26 UTC (permalink / raw)
  To: dsahern; +Cc: netdev, dsahern

From: David Ahern <dsahern@kernel.org>
Date: Sun,  5 May 2019 11:16:20 -0700

> From: David Ahern <dsahern@gmail.com>
> 
> Define __ipv4_neigh_lookup_noref to return NULL when CONFIG_INET is disabled.
> 
> Fixes: 4b2a2bfeb3f0 ("neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: David Ahern <dsahern@gmail.com>

Applied.

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

end of thread, other threads:[~2019-05-05 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-05 18:16 [PATCH net] ipv4: Define __ipv4_neigh_lookup_noref when CONFIG_INET is disabled David Ahern
2019-05-05 18:26 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox