On Tue, Mar 05, 2024 at 10:52:16AM -0800, Nick Desaulniers wrote: > On Tue, Mar 5, 2024 at 10:50 AM Arnd Bergmann <arnd@xxxxxxxx> wrote: > > > > On Tue, Mar 5, 2024, at 18:42, Nathan Chancellor wrote: > > > > > > As the warnings do not appear to have a high signal to noise ratio and > > > the source level silencing options are not sustainable, disable the > > > warnings unconditionally, as they will be enabled with -Wenum-conversion > > > and are supported in all versions of clang that can build the kernel. > > > > I took a look at a sample of warnings in an allmodconfig build > > and found a number that need attention. I would much prefer to > > leave these turned on at the W=1 level and only disable them > > at the default warning level. > > Sounds like these new diagnostics are very noisy. 0day bot sends > people reports at W=1. Perhaps W=2? A number of subsystems test with W=1 as well and while opting into W=1 means that you are potentially asking for new warnings across newer compiler releases, a warning with this number of instances is going to cause a lot of issues (I think of netdev for example). I think if we are going to leave it enabled at W=2, we might as well just take this change as is then have people who are developing the fixes use 'KCFLAGS=-Wenum-conversion' when building to override it, which is more targeted than using W=2. W=2 is not run by any CI as far as I am aware, so there is not really any difference between disabled altogether vs. enabled at W=2 in terms of widespread testing. Once all the fixes (or patches to hide instances) are picked up and merged into Linus's tree, this change can just be reverted. Fundamentally, I do not really care which avenue we take (either this change or off by default, on at W=1), I am happy to do whatever. Unfortunately, CONFIG_WERROR makes these decisions much more urgent because it is either disable it and have other warnings creep in amongst the sprawl of these warnings or leave it on and miss other errors for the same reason. Cheers, Nathan