netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net-next] ipv6: use ipv6_addr_scope() helper
@ 2013-05-22 15:52 Cong Wang
  2013-05-23  8:18 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2013-05-22 15:52 UTC (permalink / raw)
  To: netdev; +Cc: Hideaki YOSHIFUJI, David S. Miller, Cong Wang

From: Cong Wang <xiyou.wangcong@gmail.com>

ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK could be replaced
by ipv6_addr_scope(), which is slightly faster.

Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

---
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index d684d23..bceaaa7 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1126,8 +1126,7 @@ retry:
 
 	ift = !max_addresses ||
 	      ipv6_count_addresses(idev) < max_addresses ?
-		ipv6_add_addr(idev, &addr, tmp_plen,
-			      ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK,
+		ipv6_add_addr(idev, &addr, tmp_plen, ipv6_addr_scope(&addr),
 			      addr_flags) : NULL;
 	if (IS_ERR_OR_NULL(ift)) {
 		in6_ifa_put(ifp);

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

* Re: [Patch net-next] ipv6: use ipv6_addr_scope() helper
  2013-05-22 15:52 [Patch net-next] ipv6: use ipv6_addr_scope() helper Cong Wang
@ 2013-05-23  8:18 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-05-23  8:18 UTC (permalink / raw)
  To: xiyou.wangcong; +Cc: netdev, yoshfuji

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Wed, 22 May 2013 23:52:22 +0800

> From: Cong Wang <xiyou.wangcong@gmail.com>
> 
> ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK could be replaced
> by ipv6_addr_scope(), which is slightly faster.
> 
> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Applied.

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

end of thread, other threads:[~2013-05-23  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22 15:52 [Patch net-next] ipv6: use ipv6_addr_scope() helper Cong Wang
2013-05-23  8:18 ` David Miller

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).