Re: [PATCH] arm64/cache: silence -Woverride-init warnings
From: Will Deacon
Date: Fri Aug 09 2019 - 05:04:20 EST
On Thu, Aug 08, 2019 at 06:18:39PM -0400, Qian Cai wrote:
> > On Aug 8, 2019, at 6:38 AM, Mark Rutland <mark.rutland@xxxxxxx> wrote:
> > Please just turn this off by default for clang.
>
> As mentioned before, it is very valuable to run âmake W=1â given it found
> many real developer mistakes which will enable â-Woverride-initâ for both
> compilers. Even â-Woverride-initâ itself is useful find real issues as in,
Every single patch you've sent to me resulting from building with "W=1" has
been a false positive. Every. Single. One. That's not what I would call
"very valuable". It's probably what I'd call a "colossal waste of
everybody's time", especially as your tendancy to shoot from the hip when
writing these so-called fixes has resulted in some patches that ACTUALLY
INTRODUCED REAL BUGS. Do you see the insanity here?
> ae5e033d65a (âmfd: rk808: Fix RK818_IRQ_DISCHG_ILIM initializerâ)
> 32df34d875bb (â[media] rc: img-ir: jvc: Remove unused no-leader timingsâ)
>
> Especially, to find redundant initializations in large structures. e.g.,
>
> e6ea0b917875 (â[media] dvb_frontend: Don't declare values twice at a tableâ)
>
> It is important to keep the noise-level as low as possible by keeping the
> amount of false positives under control to be truly benefit from those
> valuable compiler warnings.
So that's where you and I have a disagreement. I think maintainability
of the code is the single most important thing to consider after
correctness.
If code isn't maintainable, then it's liable to churn and be a constant
source of bugs as people keep tripping over whatever subtleties lie within.
In some cases, we have little choice and the combination of things like
performance requirements and compatibility force us down a path which we
wouldn't otherwise have considered. However, appeasing a compiler warning
that *doesn't even appear with the default build options* does not quality
for this sort of treatment in my opinion, so I will not be applying your
patch.
Please stop sending it. Real fixes, sure, but not this rubbish.
Will