Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y
@ 2023-03-31 10:15 Jani Nikula
  2023-03-31 10:22 ` Jani Nikula
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jani Nikula @ 2023-03-31 10:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula, Masahiro Yamada

Increase awareness of kernel-doc issues by enabling doc check locally
when W= is *not* specified on the make command-line, but
CONFIG_DRM_I915_WERROR=y is enabled.

Once the warnings have been fixed, we can pass -Werror to kernel-doc
locally, and fail the build when there are kernel-doc warnings in i915.

Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

---

Masahiro, is this an awful hack to do in our local Makefile?

Note that we do try to avoid anyone outside of i915 developers enabling
CONFIG_DRM_I915_WERROR=y.

Any other and cleaner ways of achieving this, without using W= on the
entire kernel?

On that note, it would be nice to be able to enable W= on a subdir
alone.
---
 drivers/gpu/drm/i915/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 057ef22fa9c6..13d7040801bf 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -369,6 +369,14 @@ include $(src)/gvt/Makefile
 obj-$(CONFIG_DRM_I915) += i915.o
 obj-$(CONFIG_DRM_I915_GVT_KVMGT) += kvmgt.o
 
+# kernel-doc test
+#
+# Enable locally for CONFIG_DRM_I915_WERROR=y if not already enabled.
+# See scripts/Makefile.build
+ifeq ($(KBUILD_EXTRA_WARN)$(CONFIG_DRM_I915_WERROR),y)
+    cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $<
+endif
+
 # header test
 
 # exclude some broken headers from the test coverage
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-03 15:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-31 10:15 [Intel-gfx] [PATCH] drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y Jani Nikula
2023-03-31 10:22 ` Jani Nikula
2023-03-31 15:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-01  4:59 ` [Intel-gfx] [PATCH] " Masahiro Yamada
2023-04-03 15:41   ` Jani Nikula
2023-04-01 13:46 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox