Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d2ccc3fdde1a860b970109ad78865b7e44d3fc0c
Commit:     d2ccc3fdde1a860b970109ad78865b7e44d3fc0c
Parent:     92b2dc79c3bb3f08afae6c0feaeea593b9c83a76
Author:     Chuck Lever <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 18:04:38 2007 +0200
Committer:  Thomas Gleixner <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 20:16:27 2007 +0200

    x86: Eliminate result signage problem in asm-x86_64/bitops.h
    
    The return type of __scanbit() doesn't match the return type of
    find_{first,next}_bit().  Thus when you construct something like
    this:
    
       boolean ? __scanbit() : find_first_bit()
    
    you get an unsigned long result if "boolean" is true, and a signed
    long result if "boolean" is false.
    
    In file included from /home/cel/src/linux/include/linux/mmzone.h:15,
                     from /home/cel/src/linux/include/linux/gfp.h:4,
                     from /home/cel/src/linux/include/linux/slab.h:14,
                     from /home/cel/src/linux/include/linux/percpu.h:5,
                     from
    /home/cel/src/linux/include/linux/rcupdate.h:41,
                     from /home/cel/src/linux/include/linux/dcache.h:10,
                     from /home/cel/src/linux/include/linux/fs.h:275,
                     from /home/cel/src/linux/fs/nfs/sysctl.c:9:
    /home/cel/src/linux/include/linux/nodemask.h: In function
    ‘__first_node’:
    /home/cel/src/linux/include/linux/nodemask.h:229: warning: signed and
    unsigned type in conditional expression
    /home/cel/src/linux/include/linux/nodemask.h: In function
    ‘__next_node’:
    /home/cel/src/linux/include/linux/nodemask.h:235: warning: signed and
    unsigned type in conditional expression
    /home/cel/src/linux/include/linux/nodemask.h: In function
    ‘__first_unset_node’:
    /home/cel/src/linux/include/linux/nodemask.h:253: warning: signed and
    unsigned type in conditional expression
    
    [ tglx: arch/x86 adaptation ]
    
    Signed-off-by: Chuck Lever <[EMAIL PROTECTED]>
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 include/asm-x86/bitops_64.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-x86/bitops_64.h b/include/asm-x86/bitops_64.h
index d4dbbe5..1d7d9b4 100644
--- a/include/asm-x86/bitops_64.h
+++ b/include/asm-x86/bitops_64.h
@@ -260,7 +260,7 @@ extern long find_first_bit(const unsigned long * addr, 
unsigned long size);
 extern long find_next_bit(const unsigned long * addr, long size, long offset);
 
 /* return index of first bet set in val or max when no bit is set */
-static inline unsigned long __scanbit(unsigned long val, unsigned long max)
+static inline long __scanbit(unsigned long val, unsigned long max)
 {
        asm("bsfq %1,%0 ; cmovz %2,%0" : "=&r" (val) : "r" (val), "r" (max));
        return val;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to