Commit 8892475386e819aa50856947948c546ccc964d96
Committed by
David S. Miller
1 parent
7996c799ae
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
ipv6: use ipv6_addr_scope() helper
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff
net/ipv6/addrconf.c
... | ... | @@ -1126,8 +1126,7 @@ |
1126 | 1126 | |
1127 | 1127 | ift = !max_addresses || |
1128 | 1128 | ipv6_count_addresses(idev) < max_addresses ? |
1129 | - ipv6_add_addr(idev, &addr, tmp_plen, | |
1130 | - ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK, | |
1129 | + ipv6_add_addr(idev, &addr, tmp_plen, ipv6_addr_scope(&addr), | |
1131 | 1130 | addr_flags) : NULL; |
1132 | 1131 | if (IS_ERR_OR_NULL(ift)) { |
1133 | 1132 | in6_ifa_put(ifp); |