From: Johannes Berg Date: Fri, 9 Jun 2023 08:46:42 +0000 (+0200) Subject: kbuild: enable kernel-doc -Wall for W=2 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=dd203fefd9c9e28bc141d144e032e263804c90bb;p=linux.git kbuild: enable kernel-doc -Wall for W=2 For W=2, we can enable more kernel-doc warnings, such as missing return value descriptions etc. Signed-off-by: Johannes Berg Signed-off-by: Masahiro Yamada --- diff --git a/scripts/Makefile.build b/scripts/Makefile.build index a0b4fb58201cb..ddd644bd032d0 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -101,7 +101,9 @@ else ifeq ($(KBUILD_CHECKSRC),2) endif ifneq ($(KBUILD_EXTRA_WARN),) - cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $(KDOCFLAGS) $< + cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $(KDOCFLAGS) \ + $(if $(findstring 2, $(KBUILD_EXTRA_WARN)), -Wall) \ + $< endif # Compile C sources (.c)