diff mbox series

[v3,2/2] kbuild: enable kernel-doc -Wall for W=2

Message ID 20230609104642.170be0ce1cf2.Ibd08cad396b630b68d93b2469905ad55b375af65@changeid (mailing list archive)
State New, archived
Headers show
Series [v3,1/2] kernel-doc: don't let V=1 change outcome | expand

Commit Message

Johannes Berg June 9, 2023, 8:46 a.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

For W=2, we can enable more kernel-doc warnings,
such as missing return value descriptions etc.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 scripts/Makefile.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index a0b4fb58201c..ddd644bd032d 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)