diff options
author | YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> | 2010-03-29 02:00:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-31 02:28:46 -0400 |
commit | d57b8fb8a8f94bdf467a4435be7d8bbebf87fe2a (patch) | |
tree | 07aa8906cb5717cbc531e2adfefb2d72c32a7874 /include/net/ipv6.h | |
parent | 2c73e1fe94b1962ae5df7618519c18526e9d9072 (diff) |
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>
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r-- | include/net/ipv6.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index e72fb10ce573..033ddd4652a5 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -422,7 +422,7 @@ static inline int __ipv6_addr_diff(const void *token1, const void *token2, int a | |||
422 | for (i = 0; i < addrlen; i++) { | 422 | for (i = 0; i < addrlen; i++) { |
423 | __be32 xb = a1[i] ^ a2[i]; | 423 | __be32 xb = a1[i] ^ a2[i]; |
424 | if (xb) | 424 | if (xb) |
425 | return i * 32 + 32 - fls(ntohl(xb)); | 425 | return i * 32 + 31 - __fls(ntohl(xb)); |
426 | } | 426 | } |
427 | 427 | ||
428 | /* | 428 | /* |