Patchwork [08/10] bitops: Inline bitops_flsl

login
register
mail settings
Submitter Richard Henderson
Date Feb. 14, 2013, 1:47 a.m.
Message ID <1360806463-23632-9-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/220336/
State New
Headers show

Comments

Richard Henderson - Feb. 14, 2013, 1:47 a.m.
This is the only remaining user.

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 util/bitops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/util/bitops.c b/util/bitops.c
index 9cd1c3a..50b4a81 100644
--- a/util/bitops.c
+++ b/util/bitops.c
@@ -133,7 +133,7 @@  unsigned long find_last_bit(const unsigned long *addr, unsigned long size)
         tmp = addr[--words];
         if (tmp) {
         found:
-            return words * BITS_PER_LONG + bitops_flsl(tmp);
+            return words * BITS_PER_LONG + BITS_PER_LONG - 1 - clzl(tmp);
         }
     }