diff mbox series

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

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

Commit Message

Johannes Berg June 6, 2023, 8:57 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>
---
v2: - create command-line instead of exporting an
      env var, as suggested by Masahiro Yamada
---
 scripts/Makefile.build | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 90bb5badb0e9..920eeee2cb6e 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -102,6 +102,7 @@  endif
 
 ifneq ($(KBUILD_EXTRA_WARN),)
   cmd_checkdoc = $(srctree)/scripts/kernel-doc -none \
+        $(if $(findstring 2, $(KBUILD_EXTRA_WARN)), -Wall) \
         $(if $(KDOC_WALL), -Wall) \
         $(if $(KDOC_WRETURN), -Wreturn) \
         $(if $(KDOC_WSHORT_DESC), -Wshort-desc) \