mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-13 21:02:35 +00:00
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:
parent
2c73e1fe94
commit
d57b8fb8a8
@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user