[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200812041019.21926.rusty@rustcorp.com.au>
Date: Thu, 4 Dec 2008 10:19:21 +1030
From: Rusty Russell <rusty@...tcorp.com.au>
To: Haavard Skinnemoen <hskinnemoen@...el.com>
Cc: linux-kernel@...r.kernel.org,
Stephen Rothwell <sfr@...b.auug.org.au>
Subject: [PATCH 1/1] avr32: define __fls
Like fls, but can't be handed 0 and returns the bit number.
(I added find_last_bit() to bitmap.h which broke archs which didn't
define this)
Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
---
arch/avr32/include/asm/bitops.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/avr32/include/asm/bitops.h b/arch/avr32/include/asm/bitops.h
--- a/arch/avr32/include/asm/bitops.h
+++ b/arch/avr32/include/asm/bitops.h
@@ -263,6 +263,11 @@ static inline int fls(unsigned long word
return 32 - result;
}
+static inline int __fls(unsigned long word)
+{
+ return fls(word) - 1;
+}
+
unsigned long find_first_zero_bit(const unsigned long *addr,
unsigned long size);
unsigned long find_next_zero_bit(const unsigned long *addr,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists