dect
/
linux-2.6
Archived
13
0
Fork 0

ipv6: Use __fls() instead of fls() in __ipv6_addr_diff().

Because we have ensured that the argument is non-zero,
it is better to use __fls() and generate better code.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
YOSHIFUJI Hideaki / 吉藤英明 2010-03-29 06:00:05 +00:00 committed by David S. Miller
parent 2c73e1fe94
commit d57b8fb8a8
1 changed files with 1 additions and 1 deletions

View File

@ -422,7 +422,7 @@ static inline int __ipv6_addr_diff(const void *token1, const void *token2, int a
for (i = 0; i < addrlen; i++) {
__be32 xb = a1[i] ^ a2[i];
if (xb)
return i * 32 + 32 - fls(ntohl(xb));
return i * 32 + 31 - __fls(ntohl(xb));
}
/*