On 12/02/20 21:13, Linus Torvalds wrote: > On Wed, Feb 12, 2020 at 12:02 PM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: >> >> I know, but still I consider it. There is no reason why the "build >> test" should be anything more than "make && echo yes i am build-tested". > > It damn well should check for warnings. > > And if you can't bother eye-balling it or scripting it, then simply use > > make KCFLAGS=-Werror > > but sadly I can't enforce that in general for all kernel builds simply > because some people use compilers that cause new warnings (compiler > updates etc commonly result in them, for example). Shouldn't we _try_? Compilers are not adding or triggering as many warnings as they were a few years ago, when clang came out or GCC 4 rewrote their middle end. Compiling the 10-year-old 2.6.32 these days results in a couple warnings for the RHEL6 configuration. Sometimes there are even hard errors making -Wno-error moot. We can fix them in stable kernels. For master, distro people and build bots would catch that early and we can fix everything quickly. For the odd case such as a bisection on old trees, _that_ is when you add -Wno-error. Special cases deserve special options, general cases don't. The issue percolates all the way down to the developers, Oliver could have specified KCFLAGS too and he wouldn't have sent the bad patch, but honestly I can't blame him. You can blame me, :) but again that doesn't mean Linux as a whole can't do better. Anyway---sorry again for the screwup. I'll send a revised pull request soon. Thanks, Paolo > So I can't add -Werror in general, but developers can certainly use it > trivially. > > No grep or other scripting required (although the above may cause > problems for that one sample file that does cause warnings - I didn't > check). > > Linus >