On Tue, 2023-06-06 at 20:15 +0900, Masahiro Yamada wrote: > > > > ifneq ($(KBUILD_EXTRA_WARN),) > > - cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $< > > + cmd_checkdoc = $(srctree)/scripts/kernel-doc -none \ > > + $(if $(KDOC_WALL), -Wall) \ > > + $(if $(KDOC_WRETURN), -Wreturn) \ > > + $(if $(KDOC_WSHORT_DESC), -Wshort-desc) \ > > + $(if $(KDOC_WSHORT_DESC), -Wcontents-before-sections) \ > > > > Sorry, I misunderstood your intention. > (I just thought existing env variables would be moved to Makefile) > > > I do not want to proliferate env variables any more. Oh, ok, sure. > If you need per-flag control, maybe we can do like this? Well honestly, I myself just want to pass -Wall, but not necessarily W=2 since that adds more stuff from the C compiler. > cmd_checkdoc = $(srctree)/scripts/kernel-doc -none \ > $(KDOCFLAGS) > > > Then, users can do > > $ make KDOCFLAGS=-Wall > $ make KDOCFLAGS=-Wreturn I'd rather call it KDOC_FLAGS if you don't mind to align with KDOC_WERROR which we have already, but sure, can do. johannes