linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Aleksei Vetrov <vvvvvv@google.com>
To: Nathan Chancellor <nathan@kernel.org>, Arnd Bergmann <arnd@arndb.de>
Cc: Shivamurthy Shastri <shivamurthy.shastri@linutronix.de>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	akpm@linux-foundation.org, vbabka@suse.cz, willy@infradead.org,
	hannes@cmpxchg.org, anna-maria@linutronix.de, tglx@linutronix.de,
	arnd@arndb.de, llvm@lists.linux.dev
Subject: Re: [PATCH] mm/vmstat: Fix -Wenum-enum-conversion warning in vmstat.h
Date: Thu, 10 Oct 2024 10:40:25 +0000	[thread overview]
Message-ID: <ZwevGZHiXOBqoslA@google.com> (raw)
In-Reply-To: <20241008005136.GA241099@thelio-3990X>

Hi Nathan,

On Mon, Oct 07, 2024 at 05:51:36PM -0700, Nathan Chancellor wrote:
> For what it's worth, I never really saw Matthew's comment around what
> value does this warning provide addressed. I was the one who originally
> moved it into W=1 at the request of Arnd because he felt that instances
> of this warning could be bugs and they should be audited.  However, I
> have not seen many instances of this warning pop up in new code through
> 0day build reports and the ones that I have seen seem to be intentional,
> as they are using enums like integral values, such as here. If that is
> just going to result in a bunch of patches like this adding unnecessary
> casts, I think it would just be better to consider disabling this
> warning altogether or at the very least, moving it to W=2 (which is for
> warnings that are noisy but might contain bugs), since more people are
> using W=1 as their normal build configuration nowadays.

If time has proven that this warning has never found an unintended enum
conversion, then it is worth to disable it for everyone. As you said in
the original thread ([PATCH] kbuild: Disable two Clang specific
enumeration warnings), W=2 is not run by any CI, so I would prefer to
disable it completely.

Alternatives considered:

* Enable -Wenum-enum-conversion only for 0day build reports through
  KCFLAGS. It will eliminate noise for regular users while keeping
  developers informed about new instances of this warning.
* -Wno-error=enum-enum-conversion to keep warning but don't block
  compilation for CONFIG_WERROR users.

Arnd Bergmann, what do you think? Have you found it useful after all?


  reply	other threads:[~2024-10-10 10:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-21 11:16 Shivamurthy Shastri
2024-06-21 18:13 ` Matthew Wilcox
2024-06-22  0:59   ` Andrew Morton
2024-10-07 20:13 ` Aleksei Vetrov
2024-10-08  0:51   ` Nathan Chancellor
2024-10-10 10:40     ` Aleksei Vetrov [this message]
2024-10-11 14:05       ` Arnd Bergmann
2024-10-15  8:47         ` Nathan Chancellor
2024-10-15 16:55           ` Aleksei Vetrov
2024-10-16 18:02             ` 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=ZwevGZHiXOBqoslA@google.com \
    --to=vvvvvv@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=anna-maria@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=shivamurthy.shastri@linutronix.de \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox