[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <156879.1431503013@turing-police.cc.vt.edu>
Date: Wed, 13 May 2015 03:43:33 -0400
From: Valdis.Kletnieks@...edu
To: Ingo Molnar <mingo@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Anvin <hpa@...or.com>, Brian Gerst <brgerst@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>,
Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...capital.net>,
Louis Langholtz <lou_langholtz@...com>,
Denys Vlasenko <dvlasenk@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [tip:x86/build] x86/build: Remove -Wno-sign-compare
On Tue, 12 May 2015 10:44:15 +0200, Ingo Molnar said:
> Btw., just some feedback, 'random' kernel configs still generate a ton
> of warnings:
>
> randconf: # 9, ed602bbb, Tue_May_12_09_07_25_CEST_2015: 39 kernels/hour,
[ bzImage... 81 secs, modules... 21 secs, done ] (warns: 6)
> randconf: # 10, ed602bbb, Tue_May_12_09_10_10_CEST_2015: 36 kernels/hour,
[ bzImage... 43 secs, modules... 20 secs, done ] (warns: 12)
> randconf: # 11, ed602bbb, Tue_May_12_09_11_52_CEST_2015: 36 kernels/hour,
[ bzImage... 71 secs, modules... 0 secs, done ] (warns: 5)
> randconf: # 12, ed602bbb, Tue_May_12_09_12_56_CEST_2015: 37 kernels/hour,
[ bzImage... 64 secs, modules... 28 secs, done ] (warns: 16)
> randconf: # 13, ed602bbb, Tue_May_12_09_14_07_CEST_2015: 38 kernels/hour,
[ bzImage... 106 secs, modules... 0 secs, done ] (warns: 157)
> randconf: # 14, ed602bbb, Tue_May_12_09_15_40_CEST_2015: 38 kernels/hour,
[ bzImage... 100 secs, modules... 0 secs, done ] (warns: 11)
> randconf: # 15, ed602bbb, Tue_May_12_09_17_27_CEST_2015: 37 kernels/hour,
[ bzImage... 65 secs, modules... 28 secs, done ] (warns: 26)
> randconf: # 16, ed602bbb, Tue_May_12_09_19_08_CEST_2015: 37 kernels/hour,
[ bzImage... 70 secs, modules... 0 secs, done ] (warns: 228)
> Before I pushed out this -Wno-sign-compare change I made sure there
> are no extra warnings generated on the 8 key configs I monitor
> explicitly: [def|allno|allyes|allmod]config[64|32].
It makes my config totally explode on next-20150512
% gcc --version
gcc (GCC) 5.1.1 20150422 (Red Hat 5.1.1-1)
% grep "warning: comparison between signed and unsigned integer expressions" build.default | wc -l
64148
A *lot*of them appear to be exploding inside likely(). Here's all the
exploding for *one file*...
CC init/main.o
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from init/main.c:14:
include/asm-generic/qrwlock.h: In function 'queue_write_trylock':
include/asm-generic/qrwlock.h:93:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
cnts, cnts | _QW_LOCKED) == cnts);
^
include/linux/compiler.h:132:43: note: in definition of macro 'likely'
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
^
include/asm-generic/qrwlock.h:93:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
cnts, cnts | _QW_LOCKED) == cnts);
^
include/linux/compiler.h:108:47: note: in definition of macro 'likely_notrace'
#define likely_notrace(x) __builtin_expect(!!(x), 1)
^
include/linux/compiler.h:132:56: note: in expansion of macro '__branch_check__'
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
^
include/asm-generic/qrwlock.h:92:9: note: in expansion of macro 'likely'
return likely(atomic_cmpxchg(&lock->cnts,
^
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from init/main.c:14:
./arch/x86/include/asm/uaccess.h: In function 'copy_from_user':
./arch/x86/include/asm/uaccess.h:712:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
^
include/linux/compiler.h:132:43: note: in definition of macro 'likely'
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
^
./arch/x86/include/asm/uaccess.h:712:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
^
include/linux/compiler.h:132:51: note: in definition of macro 'likely'
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
^
./arch/x86/include/asm/uaccess.h:712:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
^
include/linux/compiler.h:108:47: note: in definition of macro 'likely_notrace'
#define likely_notrace(x) __builtin_expect(!!(x), 1)
^
include/linux/compiler.h:132:56: note: in expansion of macro '__branch_check__'
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
^
./arch/x86/include/asm/uaccess.h:712:6: note: in expansion of macro 'likely'
if (likely(sz < 0 || sz >= n))
^
./arch/x86/include/asm/uaccess.h: In function 'copy_to_user':
./arch/x86/include/asm/uaccess.h:730:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
^
include/linux/compiler.h:132:43: note: in definition of macro 'likely'
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
^
./arch/x86/include/asm/uaccess.h:730:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
^
include/linux/compiler.h:132:51: note: in definition of macro 'likely'
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
^
./arch/x86/include/asm/uaccess.h:730:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
^
include/linux/compiler.h:108:47: note: in definition of macro 'likely_notrace'
#define likely_notrace(x) __builtin_expect(!!(x), 1)
^
include/linux/compiler.h:132:56: note: in expansion of macro '__branch_check__'
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
^
./arch/x86/include/asm/uaccess.h:730:6: note: in expansion of macro 'likely'
if (likely(sz < 0 || sz >= n))
^
In file included from ./arch/x86/include/asm/preempt.h:5:0,
from include/linux/preempt.h:18,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from init/main.c:15:
include/linux/percpu-refcount.h: In function 'percpu_ref_get_many':
./arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
((val) == 1 || (val) == -1)) ? \
^
./arch/x86/include/asm/percpu.h:419:34: note: in expansion of macro 'percpu_add_op'
#define this_cpu_add_1(pcp, val) percpu_add_op((pcp), val)
^
include/linux/percpu-defs.h:364:11: note: in expansion of macro 'this_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:498:33: note: in expansion of macro '__pcpu_size_call'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^
include/linux/percpu-refcount.h:177:3: note: in expansion of macro 'this_cpu_add'
this_cpu_add(*percpu_count, nr);
^
./arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
((val) == 1 || (val) == -1)) ? \
^
./arch/x86/include/asm/percpu.h:420:34: note: in expansion of macro 'percpu_add_op'
#define this_cpu_add_2(pcp, val) percpu_add_op((pcp), val)
^
include/linux/percpu-defs.h:365:11: note: in expansion of macro 'this_cpu_add_2'
case 2: stem##2(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:498:33: note: in expansion of macro '__pcpu_size_call'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^
include/linux/percpu-refcount.h:177:3: note: in expansion of macro 'this_cpu_add'
this_cpu_add(*percpu_count, nr);
^
./arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
((val) == 1 || (val) == -1)) ? \
^
./arch/x86/include/asm/percpu.h:421:34: note: in expansion of macro 'percpu_add_op'
#define this_cpu_add_4(pcp, val) percpu_add_op((pcp), val)
^
include/linux/percpu-defs.h:366:11: note: in expansion of macro 'this_cpu_add_4'
case 4: stem##4(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:498:33: note: in expansion of macro '__pcpu_size_call'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^
include/linux/percpu-refcount.h:177:3: note: in expansion of macro 'this_cpu_add'
this_cpu_add(*percpu_count, nr);
^
./arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
((val) == 1 || (val) == -1)) ? \
^
./arch/x86/include/asm/percpu.h:478:35: note: in expansion of macro 'percpu_add_op'
#define this_cpu_add_8(pcp, val) percpu_add_op((pcp), val)
^
include/linux/percpu-defs.h:367:11: note: in expansion of macro 'this_cpu_add_8'
case 8: stem##8(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:498:33: note: in expansion of macro '__pcpu_size_call'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^
include/linux/percpu-refcount.h:177:3: note: in expansion of macro 'this_cpu_add'
this_cpu_add(*percpu_count, nr);
^
include/linux/percpu-refcount.h: In function 'percpu_ref_put_many':
./arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
((val) == 1 || (val) == -1)) ? \
^
./arch/x86/include/asm/percpu.h:419:34: note: in expansion of macro 'percpu_add_op'
#define this_cpu_add_1(pcp, val) percpu_add_op((pcp), val)
^
include/linux/percpu-defs.h:364:11: note: in expansion of macro 'this_cpu_add_1'
case 1: stem##1(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:498:33: note: in expansion of macro '__pcpu_size_call'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:508:33: note: in expansion of macro 'this_cpu_add'
#define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
^
include/linux/percpu-refcount.h:276:3: note: in expansion of macro 'this_cpu_sub'
this_cpu_sub(*percpu_count, nr);
^
./arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
((val) == 1 || (val) == -1)) ? \
^
./arch/x86/include/asm/percpu.h:420:34: note: in expansion of macro 'percpu_add_op'
#define this_cpu_add_2(pcp, val) percpu_add_op((pcp), val)
^
include/linux/percpu-defs.h:365:11: note: in expansion of macro 'this_cpu_add_2'
case 2: stem##2(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:498:33: note: in expansion of macro '__pcpu_size_call'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:508:33: note: in expansion of macro 'this_cpu_add'
#define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
^
include/linux/percpu-refcount.h:276:3: note: in expansion of macro 'this_cpu_sub'
this_cpu_sub(*percpu_count, nr);
^
./arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
((val) == 1 || (val) == -1)) ? \
^
./arch/x86/include/asm/percpu.h:421:34: note: in expansion of macro 'percpu_add_op'
#define this_cpu_add_4(pcp, val) percpu_add_op((pcp), val)
^
include/linux/percpu-defs.h:366:11: note: in expansion of macro 'this_cpu_add_4'
case 4: stem##4(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:498:33: note: in expansion of macro '__pcpu_size_call'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:508:33: note: in expansion of macro 'this_cpu_add'
#define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
^
include/linux/percpu-refcount.h:276:3: note: in expansion of macro 'this_cpu_sub'
this_cpu_sub(*percpu_count, nr);
^
./arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
((val) == 1 || (val) == -1)) ? \
^
./arch/x86/include/asm/percpu.h:478:35: note: in expansion of macro 'percpu_add_op'
#define this_cpu_add_8(pcp, val) percpu_add_op((pcp), val)
^
include/linux/percpu-defs.h:367:11: note: in expansion of macro 'this_cpu_add_8'
case 8: stem##8(variable, __VA_ARGS__);break; \
^
include/linux/percpu-defs.h:498:33: note: in expansion of macro '__pcpu_size_call'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:508:33: note: in expansion of macro 'this_cpu_add'
#define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
^
include/linux/percpu-refcount.h:276:3: note: in expansion of macro 'this_cpu_sub'
this_cpu_sub(*percpu_count, nr);
^
In file included from include/linux/blkdev.h:18:0,
from init/main.c:75:
include/linux/bio.h: In function 'bio_next_split':
include/linux/bio.h:388:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (sectors >= bio_sectors(bio))
^
init/main.c: In function 'do_initcalls':
init/main.c:860:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (level = 0; level < ARRAY_SIZE(initcall_levels) - 1; level++)
^
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists