Thread (26 messages) 26 messages, 3 authors, 2016-06-15

Re: [PATCHv3 net-next 04/12] ndisc: add __ndisc_opt_addr_space function

flat view

From: Stefan Schmidt <hidden>
Date: 2016-06-15 15:09:33
Also in: linux-bluetooth

Hello.

On 14/06/16 13:52, Alexander Aring wrote:
quoted hunk ↗ jump to hunk
This patch adds __ndisc_opt_addr_space as low-level function for
ndisc_opt_addr_space which doesn't depend on net_device parameter.

Cc: David S. Miller<davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: Alexey Kuznetsov<kuznet-v/Mj1YrvjDBInbfyfbPRSQ@public.gmane.org>
Cc: James Morris<jmorris-gx6/JNMH7DfYtjvyW6yDsg@public.gmane.org>
Cc: Hideaki YOSHIFUJI<redacted>
Cc: Patrick McHardy<redacted>
Signed-off-by: Alexander Aring<redacted>
---
  include/net/ndisc.h | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 2d8edaa..4cee826 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -127,10 +127,15 @@ static inline int ndisc_addr_option_pad(unsigned short type)
  	}
  }
  
+static inline int __ndisc_opt_addr_space(unsigned char addr_len, int pad)
+{
+	return NDISC_OPT_SPACE(addr_len + pad);
+}
+
  static inline int ndisc_opt_addr_space(struct net_device *dev)
  {
-	return NDISC_OPT_SPACE(dev->addr_len +
-			       ndisc_addr_option_pad(dev->type));
+	return __ndisc_opt_addr_space(dev->addr_len,
+				      ndisc_addr_option_pad(dev->type));
  }
  
  static inline u8 *ndisc_opt_addr_data(struct nd_opt_hdr *p,
Reviewed-by: Stefan Schmidt<redacted>

regards
Stefan Schmidt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help