[PATCH 1/12] FS-Cache: Handle -Wsign-compare in i386 bitops

From: David Howells
Date: Mon Nov 14 2005 - 16:55:06 EST


The attached patch makes i386's find_first_bit() use an unsigned integer as a
counter to avoid getting warnings when -Wsign-compare is given.

Signed-Off-By: David Howells <dhowells@xxxxxxxxxx>
---
warthog>diffstat -p1 asm-i386-bitops-2614mm2.diff
include/asm-i386/bitops.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff -uNrp linux-2.6.14-mm2/include/asm-i386/bitops.h linux-2.6.14-mm2-cachefs/include/asm-i386/bitops.h
--- linux-2.6.14-mm2/include/asm-i386/bitops.h 2005-08-30 13:56:33.000000000 +0100
+++ linux-2.6.14-mm2-cachefs/include/asm-i386/bitops.h 2005-11-14 16:23:38.000000000 +0000
@@ -332,9 +332,9 @@ static inline unsigned long __ffs(unsign
* Returns the bit-number of the first set bit, not the number of the byte
* containing a bit.
*/
-static inline int find_first_bit(const unsigned long *addr, unsigned size)
+static inline unsigned find_first_bit(const unsigned long *addr, unsigned size)
{
- int x = 0;
+ unsigned x = 0;

while (x < size) {
unsigned long val = *addr++;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/