[PATCH] x86: handle -Wsign-compare in bitops
authorDavid Howells <dhowells@redhat.com>
Fri, 6 Jan 2006 08:11:59 +0000 (00:11 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:33:36 +0000 (08:33 -0800)
Make 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@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-i386/bitops.h

index 4807aa1d2e3d865fe41c70045da8d4ccd0a4bbfc..26eb9811712fe6ae6cfdbb527a3bc7e696dc88bb 100644 (file)
@@ -332,9 +332,9 @@ static inline unsigned long __ffs(unsigned long word)
  * 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++;