diff options
author | Jesse Millan <jessem@cs.pdx.edu> | 2005-07-29 00:15:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-29 00:46:02 -0400 |
commit | 8d224d32c28c165f7100a670d61d64dd15d49a1e (patch) | |
tree | 7629d258137c67e395f471fccb846a7a421dab13 /include/asm-x86_64/bitops.h | |
parent | 07291d431ce6c6660c35dd4e5e980a406dc3629a (diff) |
[PATCH] x86_64: Fix gcc 4 warning in sched_find_first_bit
This patch eliminates the GCC4 warning on the x86_64 platform:
kernel/sched.c:1824: warning: control may reach end of non-void function
'sched_find_first_bit' being inlined.
The change follows the lead of others, i.e. it is guaranteed that at least
one of b[0], b[1], or b[2] will have a bit set and evaluate to true. That
being said, GCC4.0.0 notices that the code flow does not return anything if
b[0], b[1] and b[2] are not true. Since we know better, if it's not b[0] or
b[1], it has to be b[2].
Signed-off-by: Jesse Millan <jessem@cs.pdx.edu>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64/bitops.h')
-rw-r--r-- | include/asm-x86_64/bitops.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/asm-x86_64/bitops.h b/include/asm-x86_64/bitops.h index a31bb99be53f..05a0d374404b 100644 --- a/include/asm-x86_64/bitops.h +++ b/include/asm-x86_64/bitops.h | |||
@@ -348,8 +348,7 @@ static inline int sched_find_first_bit(const unsigned long *b) | |||
348 | return __ffs(b[0]); | 348 | return __ffs(b[0]); |
349 | if (b[1]) | 349 | if (b[1]) |
350 | return __ffs(b[1]) + 64; | 350 | return __ffs(b[1]) + 64; |
351 | if (b[2]) | 351 | return __ffs(b[2]) + 128; |
352 | return __ffs(b[2]) + 128; | ||
353 | } | 352 | } |
354 | 353 | ||
355 | /** | 354 | /** |