提交 d89c145c 编写于 作者: D David Howells 提交者: Linus Torvalds

[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: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 2684927c
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册