Re: [tip:x86/mm 1/23] arch/x86/mm/init.c:75:6: warning: no previous prototype for function 'x86_has_pat_wp'

From: Nick Desaulniers
Date: Tue May 19 2020 - 21:07:29 EST


On Tue, May 19, 2020 at 5:53 PM Philip Li <philip.li@xxxxxxxxx> wrote:
>
> On Tue, May 19, 2020 at 05:26:18PM -0700, Nick Desaulniers wrote:
> > I think having in the top of the warning that this is a W=1 build will
> > make it more obvious.
> >
> > I get that -Wmissing-prototypes can be noisy, but it's trivial to fix.
> > I do worry what other warnings lurk in W=1 though...
> with some monitoring, so far, issue like unused-but-set-variable is quite
> helpful. We will keep monitor for other issues and feedbacks.

Hey, I'm always happy to see more warnings turned on. In our
experience, we had to get a sense of how many instances of a newly
enabled warning there are, and estimate how much time it would take to
fix them all. It's further complicated by the fix going into
different maintainers' trees and reaching mainline at different points
in time, while regressions continue to sneak in until the warning is
enabled.

It may be time to consider "promoting" some warnings from W=1 to be on
by default. But that takes careful manual review and estimation of
the work involved. Turning on W=1 may be blasting people with a lot
of new warnings, but if developers treat them with the same respect as
the default enabled ones for Kbuild then I'm not complaining.
--
Thanks,
~Nick Desaulniers