Skip to contentSkip to conversation

drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y

PATCH Superseded Jani Nikula 3 participants 6 messages Mar 31, 2023 – Apr 3, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y

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 <[email protected]>

---

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(+)
drivers/gpu/drm/i915/Makefile +8 -0
index 057ef22fa9c6..13d7040801bf 100644
@@ -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
Signature · 1 line
2.39.2
#1 lore raw
Quoted 14 lines · Jani Nikula

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 <[email protected]>

---

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

Quoted 8 lines

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.

To elaborate, we add a bunch of W=1 style warnings in our local Makefile, and try to maintain a high standard with them, but it's a bit tedious to duplicate what's in scripts/Makefile.extrawarn. However that doesn't seem to be easily reusable for subdir-ccflags-y.

We also add -Werror for CONFIG_DRM_I915_WERROR=y, and have our developers and CI use that so we don't slip.

As to this patch, we'd like to do the same for kernel-doc. And, hopefully, also enable -Werror for kernel-doc.

BR,
Jani.

Quoted 23 lines
---
 drivers/gpu/drm/i915/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/i915/Makefile +8 -0
index 057ef22fa9c6..13d7040801bf 100644
@@ -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
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#2 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y
URL : https://patchwork.freedesktop.org/series/115928/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12951 -> Patchwork_115928v1
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/index.html

Participating hosts (37 -> 37)
------------------------------

Additional (1): fi-kbl-soraka
Missing (1): fi-snb-2520m

Known issues
------------

Here are the changes found in Patchwork_115928v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][1] ([fdo#109271] / [i915#2190])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/fi-kbl-soraka/igt@[email protected]

* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][2] ([fdo#109271] / [i915#4613]) +3 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/fi-kbl-soraka/igt@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][3] ([i915#5334] / [i915#7872])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@gt_lrc:
- bat-rpls-1: [PASS][4] -> [INCOMPLETE][5] ([i915#4983])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/bat-rpls-1/igt@i915_selftest@live@gt_lrc.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/bat-rpls-1/igt@i915_selftest@live@gt_lrc.html

* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][6] ([i915#1886])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@reset:
- bat-rpls-2: [PASS][7] -> [ABORT][8] ([i915#4983] / [i915#7913])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/bat-rpls-2/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@kms_chamelium_frames@hdmi-crc-fast:
- fi-kbl-soraka: NOTRUN -> [SKIP][9] ([fdo#109271]) +16 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/fi-kbl-soraka/igt@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: NOTRUN -> [SKIP][10] ([i915#5354])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/bat-dg2-11/igt@[email protected]

#### Possible fixes ####

* igt@i915_pm_rps@basic-api:
- bat-dg2-11: [FAIL][11] ([i915#8308]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/bat-dg2-11/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/bat-dg2-11/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- fi-skl-guc: [DMESG-WARN][13] ([i915#8073]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/fi-skl-guc/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/fi-skl-guc/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-d-dp-1:
- bat-dg2-8: [FAIL][15] ([i915#7932]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#7872]: https://gitlab.freedesktop.org/drm/intel/issues/7872
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#8073]: https://gitlab.freedesktop.org/drm/intel/issues/8073
[i915#8308]: https://gitlab.freedesktop.org/drm/intel/issues/8308

Build changes
-------------

* Linux: CI_DRM_12951 -> Patchwork_115928v1

CI-20190529: 20190529
CI_DRM_12951: f128906b94b25a0f0c12dc8c647b8adc8d934d8c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7230: f0485204004305dd3ee8f8bbbb9c552e53a4e050 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_115928v1: f128906b94b25a0f0c12dc8c647b8adc8d934d8c @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

2a9490475970 drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/index.html

#3 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y
URL : https://patchwork.freedesktop.org/series/115928/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12951_full -> Patchwork_115928v1_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (7 -> 7)
------------------------------

No changes in participating hosts

Known issues
------------

Here are the changes found in Patchwork_115928v1_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_fair@basic-deadline:
- shard-glk: [PASS][1] -> [FAIL][2] ([i915#2846])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/shard-glk9/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/shard-glk8/igt@[email protected]

* igt@gen9_exec_parse@allowed-single:
- shard-apl: [PASS][3] -> [ABORT][4] ([i915#5566])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/shard-apl7/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/shard-apl1/igt@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- shard-apl: [PASS][5] -> [DMESG-FAIL][6] ([i915#5334])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/shard-apl1/igt@i915_selftest@live@gt_heartbeat.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/shard-apl2/igt@i915_selftest@live@gt_heartbeat.html

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-glk: [PASS][7] -> [FAIL][8] ([i915#2346])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/shard-glk1/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/shard-glk9/igt@[email protected]

* igt@kms_flip@plain-flip-ts-check-interruptible@b-hdmi-a1:
- shard-glk: [PASS][9] -> [FAIL][10] ([i915#2122])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/shard-glk5/igt@kms_flip@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/shard-glk2/igt@kms_flip@[email protected]

* igt@kms_plane@pixel-format-source-clamping@pipe-a-planes:
- shard-glk: [PASS][11] -> [DMESG-FAIL][12] ([i915#118])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/shard-glk1/igt@kms_plane@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/shard-glk9/igt@kms_plane@[email protected]

#### Possible fixes ####

* igt@gem_ctx_exec@basic-nohangcheck:
- {shard-tglu}: [FAIL][13] ([i915#6268]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/shard-tglu-2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/shard-tglu-9/igt@[email protected]

* igt@gem_eio@in-flight-contexts-1us:
- {shard-tglu}: [TIMEOUT][15] ([i915#3063]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/shard-tglu-7/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/shard-tglu-2/igt@[email protected]

* igt@gem_eio@reset-stress:
- {shard-dg1}: [FAIL][17] ([i915#5784]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/shard-dg1-14/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/shard-dg1-15/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-glk: [FAIL][19] ([i915#72]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12951/shard-glk1/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/shard-glk9/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[IGT#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#3063]: https://gitlab.freedesktop.org/drm/intel/issues/3063
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4818]: https://gitlab.freedesktop.org/drm/intel/issues/4818
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4884]: https://gitlab.freedesktop.org/drm/intel/issues/4884
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5213]: https://gitlab.freedesktop.org/drm/intel/issues/5213
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6493]: https://gitlab.freedesktop.org/drm/intel/issues/6493
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011

Build changes
-------------

* Linux: CI_DRM_12951 -> Patchwork_115928v1

CI-20190529: 20190529
CI_DRM_12951: f128906b94b25a0f0c12dc8c647b8adc8d934d8c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7230: f0485204004305dd3ee8f8bbbb9c552e53a4e050 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_115928v1: f128906b94b25a0f0c12dc8c647b8adc8d934d8c @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115928v1/index.html

#4 lore raw
In reply to Jani Nikula
Quoted 33 lines · Jani Nikula

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 <[email protected]>

---

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(+)
drivers/gpu/drm/i915/Makefile +0 -0
index 057ef22fa9c6..13d7040801bf 100644
@@ -369,6 +369,14 @@ include $(src)/gvt/Makefile
 obj-$(CONFIG_DRM_I915) += i915.o

drivers/gpu/drm/i915/Makefile include $(src)/gvt/Makefile · line 379

Quoted 10 lines
drivers/gpu/drm/i915/Makefile +7 -0
 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
 

I do not mind this, but I do not think you need to check $(KBUILD_EXTRA_WARN).

ifdef CONFIG_DRM_I915_WERROR

    cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $<

endif

Signature · 2 lines
Best Regards
Masahiro Yamada
#5 lore raw
Quoted 36 lines · Masahiro Yamada
Quoted 35 lines · Jani Nikula

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 <[email protected]>

---

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(+)
drivers/gpu/drm/i915/Makefile +0 -0
index 057ef22fa9c6..13d7040801bf 100644
@@ -369,6 +369,14 @@ include $(src)/gvt/Makefile
 obj-$(CONFIG_DRM_I915) += i915.o
 obj-$(CONFIG_DRM_I915_GVT_KVMGT) += kvmgt.o
 
Quoted 12 lines

drivers/gpu/drm/i915/Makefile include $(src)/gvt/Makefile · line 381

Quoted 8 lines
drivers/gpu/drm/i915/Makefile +7 -0
+# 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
 

I do not mind this, but I do not think you need to check $(KBUILD_EXTRA_WARN).

Mmh, what if we later add -Werror here? Is the cmd_checkdoc local or global? Does that impact other places?

BR,
Jani.

Quoted 6 lines

ifdef CONFIG_DRM_I915_WERROR

    cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $<

endif

Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center