• Chuck Lever's avatar
    x86: Eliminate result signage problem in asm-x86_64/bitops.h · d2ccc3fd
    Chuck Lever authored
    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: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarAndi Kleen <ak@suse.de>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    d2ccc3fd
bitops_64.h 10.1 KB