Re: [PATCH] mm: Fix clang W=1 compiler warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 7 Feb 2025 at 18:56, Bart Van Assche <bvanassche@xxxxxxx> wrote:
>
> Since the patch at the start of this e-mail thread is a follow-up for
> commit 30c2de0a267c ("mm/vmstat: fix a W=1 clang compiler warning"), do
> you perhaps want me to submit a revert for that commit?

So I _think_ the proper fix is to just disable the warning (or move it
to W=2 like apparently Nathan did - crossing emails left and right
here), and once that is done, yes, reverting that commit too.

That said, I'll repeat that while I think using enums for values that
then get used for arithmetic can actually be a good thing, I'm not
entirely against the notion of saying "let's limit ourselves".

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".

           Linus




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux