All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nicolas Schier <nicolas@fjasle.eu>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	Yonghong Song <yonghong.song@linux.dev>,
	linux-kbuild@vger.kernel.org, llvm@lists.linux.dev,
	patches@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH] kbuild: Disable two Clang specific enumeration warnings
Date: Tue, 5 Mar 2024 12:30:15 -0700	[thread overview]
Message-ID: <20240305193015.GA1173426@dev-arch.thelio-3990X> (raw)
In-Reply-To: <CAKwvOd=V_Qtd2pK8AKc6bv=zMPnAaCf08=QO74ckqH26A3sefA@mail.gmail.com>

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@arndb.de> 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

  reply	other threads:[~2024-03-05 19:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 17:42 [PATCH] kbuild: Disable two Clang specific enumeration warnings Nathan Chancellor
2024-03-05 18:11 ` Yonghong Song
2024-03-05 18:49 ` Arnd Bergmann
2024-03-05 18:52   ` Nick Desaulniers
2024-03-05 19:30     ` Nathan Chancellor [this message]
2024-03-05 21:52       ` Arnd Bergmann
2024-03-05 22:14         ` Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240305193015.GA1173426@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=arnd@arndb.de \
    --cc=justinstitt@google.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=masahiroy@kernel.org \
    --cc=morbo@google.com \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.