Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d89c145c authored by David Howells's avatar David Howells Committed by Linus Torvalds
Browse files

[PATCH] x86: handle -Wsign-compare in bitops



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: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2684927c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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++;