linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jakub Kicinski <kuba@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Ivan Shapovalov <intelfx@intelfx.name>,
	Vlastimil Babka <vbabka@suse.cz>,
	David Laight <david.laight@aculab.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	David Rientjes <rientjes@google.com>,
	David Hildenbrand <david@redhat.com>,
	Kaiyang Zhao <kaiyang2@cs.cmu.edu>,
	Joel Granados <joel.granados@kernel.org>,
	Sourav Panda <souravpanda@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH] mm: Fix clang W=1 compiler warnings
Date: Fri, 7 Feb 2025 19:30:29 -0800	[thread overview]
Message-ID: <2c6e79cd-f9aa-451e-b84a-67c211d62aff@acm.org> (raw)
In-Reply-To: <CAHk-=wh4pg=+9Dj_SyQG7BXfuLBgh0kOxE7FEWoXoJkFSyBpaw@mail.gmail.com>

On 2/7/25 7:22 PM, Linus Torvalds wrote:
> So if it's _so_ rare that these are the *only* cases of that warning
> happening in the whole kernel build, then I'll just concede that while
> I still think it's a fine pattern, if it's *so* rare that we only had
> two cases of it, then it's worth fixing those two cases.
> 
> Because at some point "really really unusual" might be worth warning
> for, even if the unusual case isn't wrong per se.
> 
> But I don't have any visibility into whether this is just one header
> file fix and we're done, or whether it's actually more common, and the
> one header file case is just a "this causes lots of noise because it's
> included everywhere".

Hi Linus,

That's an interesting question: how often -Wenum-enum-conversion
warnings are triggered. I ran into these warnings while building the
code in the block/ directory with W=1. For almost every source file in
the block directory that was built, -Wenum-enum-conversion warnings
appeared for the header files include/linux/mmzone.h or
include/linux/vmstat.h. This is why I posted the patch at the start
of this email thread. Of course, moving -Wenum-enum-conversion from
W=1 to W=2 is also fine with me.

Thanks,

Bart.


  reply	other threads:[~2025-02-08  3:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31 19:12 Bart Van Assche
2025-02-03 13:32 ` Vlastimil Babka
2025-02-08  0:49 ` Jakub Kicinski
2025-02-08  1:01   ` Linus Torvalds
2025-02-08  1:38     ` Jakub Kicinski
2025-02-08  2:18       ` Nathan Chancellor
2025-02-08  3:11       ` Linus Torvalds
2025-02-08  3:33         ` Nathan Chancellor
2025-02-08  3:49           ` Linus Torvalds
2025-02-08  4:24             ` Linus Torvalds
2025-02-10 18:33               ` Jakub Kicinski
2025-02-08  2:55     ` Bart Van Assche
2025-02-08  3:22       ` Linus Torvalds
2025-02-08  3:30         ` Bart Van Assche [this message]
2025-02-08 10:28 ` Matthew Wilcox
2025-02-11 14:34   ` Vlastimil Babka
2025-02-11 18:48     ` Bart Van Assche
2025-02-11 19:25       ` Matthew Wilcox

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=2c6e79cd-f9aa-451e-b84a-67c211d62aff@acm.org \
    --to=bvanassche@acm.org \
    --cc=akpm@linux-foundation.org \
    --cc=david.laight@aculab.com \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=intelfx@intelfx.name \
    --cc=joel.granados@kernel.org \
    --cc=kaiyang2@cs.cmu.edu \
    --cc=kuba@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nathan@kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=rientjes@google.com \
    --cc=souravpanda@google.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vbabka@suse.cz \
    /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