Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d57b8fb8 authored by YOSHIFUJI Hideaki / 吉藤英明's avatar YOSHIFUJI Hideaki / 吉藤英明 Committed by David S. Miller
Browse files

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: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2c73e1fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));
	}

	/*