Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933268AbbEMIFV (ORCPT ); Wed, 13 May 2015 04:05:21 -0400 Received: from omr1.cc.vt.edu ([198.82.141.52]:45336 "EHLO omr1.cc.vt.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932791AbbEMIFJ (ORCPT ); Wed, 13 May 2015 04:05:09 -0400 X-Greylist: delayed 1145 seconds by postgrey-1.27 at vger.kernel.org; Wed, 13 May 2015 04:05:08 EDT X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6+dev To: Ingo Molnar Cc: Linus Torvalds , Peter Anvin , Brian Gerst , Thomas Gleixner , Borislav Petkov , Peter Zijlstra , Andy Lutomirski , Louis Langholtz , Denys Vlasenko , linux-kernel@vger.kernel.org Subject: Re: [tip:x86/build] x86/build: Remove -Wno-sign-compare In-Reply-To: Your message of "Tue, 12 May 2015 10:44:15 +0200." <20150512084415.GA6535@gmail.com> From: Valdis.Kletnieks@vt.edu References: <20150512084415.GA6535@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1431503013_3000P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Wed, 13 May 2015 03:43:33 -0400 Message-ID: <156879.1431503013@turing-police.cc.vt.edu> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 16572 Lines: 304 --==_Exmh_1431503013_3000P Content-Type: text/plain; charset=us-ascii 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++) ^ --==_Exmh_1431503013_3000P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Exmh version 2.5 07/13/2001 iQIVAwUBVVMApQdmEQWDXROgAQKkyw//TAhB++k3N5nRo4UEAXthUkfyDWXEJqxG ehBedtR12+4gFk3fJKJvJQpnAEGIch5TqyhWGHNuN4B+GPCZkuW+sC2YNRIVkH6v nWvDh0fLJUpfdN+28p4nE4jk9268e6Y3YZF5cSvlf9asaPeeLn2qKq7eIVfc9dQ9 zVxEVMHDycgUChPFGUmRcFkvssqoDioeSt0lVfzo5z+i4/Jd9a9QuZVrTb23fkrZ lwvXsgpZYS+mdnVnjyH67ReKxLszYcKH+goVvlpbCkDcHoPXUaTasllxgOPJQ66E 0xj9hPcbRrygT5Xm74wf51bl138ZAZGBiI1tIyW+3YVkFCREBJjf78d9iOLmcOvo 2uKC/B2TZa0wP8bzVVl2MVAOGFZzFwCVN2Unukd8f8/8quS07Zmh5mCykzU5dXae Lz90aMh8msy9E4oiTIFsfABc/P2meOfi4GOeyr3dlh2XzJjBKdpNeWHxn++wREEB NZFtRN9m6CfKbLmsomD84UUaxfkIHG8XAzKWy62Tym8sS4DJhAEQGzi1pWzicH57 0TvwAEiQ+TZ5qY+1HZIYHOm3wVgtOf28jDW07w7f3s3aydUA2AG8bRVAQ1FJkd9e i0B8zk2wdVDCgLViAq4hZddlS3Ws/7ZL0EhJHkCDu7U5u9pcncwQdg6UCyhKCuxI +1BZdaT+BJs= =Ox9X -----END PGP SIGNATURE----- --==_Exmh_1431503013_3000P-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/