On Tue, Oct 21, 2025 at 03:47:37PM -0400, Steven Rostedt wrote: > On Fri, 17 Oct 2025 22:15:20 +0200 > Nicolas Schier <[email protected]> wrote: > > > > +# To check for unused tracepoints (tracepoints that are defined but never > > > +# called), run with: > > > +# > > > +# make UT=1 > > > +# > > > +# Each unused tracepoints can take up to 5KB of memory in the running > > > kernel. > > > +# It is best to remove any that are not used. > > > + > > > +ifeq ("$(origin UT)", "command line") > > > + WARN_ON_UNUSED_TRACEPOINTS := $(UT) > > > +endif > > > + > > > +export WARN_ON_UNUSED_TRACEPOINTS > > > > Is there a special reason why you chose to introduce a new command-line > > variable instead of extending KBUILD_EXTRA_WARN / W ? > > Honestly, I didn't think about using KBUILD_EXTRA_WARN. I also want this > option to go away after we remove the current unused tracepoints so that > any new ones will always cause a warning. > > The only reason not to make it always warn is because I don't want to add > warnings for the existing code. I'm working on having outreachy projects to > remove the currently unused tracepoints. Once that is done, then this > option is going to go away and the build will always warn on unused > tracepoints. > > I thought it might be easier to remove it without any issues if it's a new > command line that goes away in the future. > > Looking at EXTRA_WARN, it appears to be for basic issues with the code and > adds new C compiler warning flags. This isn't exactly the same. > > If you think it makes sense to extend EXTRA_WARN, I can still go ahead and > do that.
thanks for clarification! For completeness: KBUILD_EXTRA_WARN is also used for non-C related checks (cp. scripts/misc-check). I somehow missed that UT= shall exist temporarily only - if this is still the plan, I don't see a strong reason to put to much work into integration in KBUILD_EXTRA_WARN. Kind regards Nicolas
