projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c73e1f
)
ipv6: Use __fls() instead of fls() in __ipv6_addr_diff().
author
YOSHIFUJI Hideaki / 吉藤英明
<yoshfuji@linux-ipv6.org>
Mon, 29 Mar 2010 06:00:05 +0000
(06:00 +0000)
committer
David S. Miller
<davem@davemloft.net>
Wed, 31 Mar 2010 06:28:46 +0000
(23:28 -0700)
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>
include/net/ipv6.h
patch
|
blob
|
history
diff --git
a/include/net/ipv6.h
b/include/net/ipv6.h
index e72fb10ce57348e82fcfd0bb36a1e641bde56cc5..033ddd4652a589334d1533b107769d9deb5889df 100644
(file)
--- 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
for (i = 0; i < addrlen; i++) {
__be32 xb = a1[i] ^ a2[i];
if (xb)
- return i * 32 + 3
2 -
fls(ntohl(xb));
+ return i * 32 + 3
1 - __
fls(ntohl(xb));
}
/*