Skip to contentSkip to conversation

kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'

PATCH Superseded Changbin Du 5 participants 12 messages Oct 20, 2019 – Oct 31, 2019

Subsystems (8)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'

The 'functions' directive is not only for functions, but also works for structs/unions. So the name is misleading. This patch renames it to 'identifiers', which specific the functions/types to be included in documentation. We keep the old name as an alias of the new one before all documentation are updated.

---
v2:
o use 'identifiers' as the new directive name.

---
 Documentation/doc-guide/kernel-doc.rst | 29 ++++++++++++++------------
 Documentation/sphinx/kerneldoc.py      | 19 ++++++++++-------
 2 files changed, 28 insertions(+), 20 deletions(-)
Documentation/doc-guide/kernel-doc.rst +16 -13
index 192c36af39e2..fff6604631ea 100644
@@ -476,6 +476,22 @@ internal: *[source-pattern ...]*
     .. kernel-doc:: drivers/gpu/drm/i915/intel_audio.c
        :internal:
 
+identifiers: *[ function/type ...]*
+  Include documentation for each *function* and *type* in *source*.
+  If no *function* is specified, the documentation for all functions
+  and types in the *source* will be included.
+
+  Examples::
+
+    .. kernel-doc:: lib/bitmap.c
+       :identifiers: bitmap_parselist bitmap_parselist_user
+
+    .. kernel-doc:: lib/idr.c
+       :identifiers:
+
+functions: *[ function/type ...]*
+  This is an alias of the 'identifiers' directive and deprecated.
+
 doc: *title*
   Include documentation for the ``DOC:`` paragraph identified by *title* in
   *source*. Spaces are allowed in *title*; do not quote the *title*. The *title*
@@ -488,19 +504,6 @@ doc: *title*
     .. kernel-doc:: drivers/gpu/drm/i915/intel_audio.c
        :doc: High Definition Audio over HDMI and Display Port
 
-functions: *[ function ...]*
-  Include documentation for each *function* in *source*.
-  If no *function* is specified, the documentation for all functions
-  and types in the *source* will be included.
-
-  Examples::
-
-    .. kernel-doc:: lib/bitmap.c
-       :functions: bitmap_parselist bitmap_parselist_user
-
-    .. kernel-doc:: lib/idr.c
-       :functions:
-
 Without options, the kernel-doc directive includes all documentation comments
 from the source file.
 
Documentation/sphinx/kerneldoc.py +12 -7
index 1159405cb920..0689f9c37f1e 100644
@@ -59,9 +59,10 @@ class KernelDocDirective(Directive):
     optional_arguments = 4
     option_spec = {
         'doc': directives.unchanged_required,
-        'functions': directives.unchanged,
         'export': directives.unchanged,
         'internal': directives.unchanged,
+        'identifiers': directives.unchanged,
+        'functions': directives.unchanged,  # alias of 'identifiers'
     }
     has_content = False
 
@@ -71,6 +72,7 @@ class KernelDocDirective(Directive):
 
         filename = env.config.kerneldoc_srctree + '/' + self.arguments[0]
         export_file_patterns = []
+        identifiers = None
 
         # Tell sphinx of the dependency
         env.note_dependency(os.path.abspath(filename))
@@ -86,19 +88,22 @@ class KernelDocDirective(Directive):
             export_file_patterns = str(self.options.get('internal')).split()
         elif 'doc' in self.options:
             cmd += ['-function', str(self.options.get('doc'))]
+        elif 'identifiers' in self.options:
+            identifiers = self.options.get('identifiers').split()
         elif 'functions' in self.options:
-            functions = self.options.get('functions').split()
-            if functions:
-                for f in functions:
-                    cmd += ['-function', f]
-            else:
-                cmd += ['-no-doc-sections']
+            identifiers = self.options.get('functions').split()
 
         for pattern in export_file_patterns:
             for f in glob.glob(env.config.kerneldoc_srctree + '/' + pattern):
                 env.note_dependency(os.path.abspath(f))
                 cmd += ['-export-file', f]
 
+        if identifiers:
+            for i in identifiers:
+                cmd += ['-function', i]
+        elif identifiers is not None:
+            cmd += ['-no-doc-sections']
+
         cmd += [filename]
 
         try:
Signature · 1 line
2.20.1
#1 lore raw

✗ Fi.CI.CHECKPATCH: warning for kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'

== Series Details ==

== Series Details ==

Series: kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'
URL : https://patchwork.freedesktop.org/series/68277/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
5c039a1a525e kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'
-:114: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Changbin Du <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 87 lines checked

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.BAT: success for kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'

In reply to Changbin Du
== Series Details ==

== Series Details ==

Series: kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'
URL : https://patchwork.freedesktop.org/series/68277/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7136 -> Patchwork_14896
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_execlists:
- fi-skl-6260u: [PASS][1] -> [INCOMPLETE][2] ([fdo#111934])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/fi-skl-6260u/igt@i915_selftest@live_execlists.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/fi-skl-6260u/igt@i915_selftest@live_execlists.html

#### Possible fixes ####

* igt@gem_ctx_create@basic:
- fi-icl-u3: [DMESG-WARN][3] ([fdo#107724]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/fi-icl-u3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/fi-icl-u3/igt@[email protected]

* igt@gem_ctx_switch@legacy-render:
- fi-icl-u3: [INCOMPLETE][5] ([fdo#107713] / [fdo#111381]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/fi-icl-u3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/fi-icl-u3/igt@[email protected]

* igt@i915_selftest@live_coherency:
- fi-kbl-soraka: [TIMEOUT][7] ([fdo#111944]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/fi-kbl-soraka/igt@i915_selftest@live_coherency.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/fi-kbl-soraka/igt@i915_selftest@live_coherency.html

* igt@i915_selftest@live_hangcheck:
- {fi-icl-u4}: [INCOMPLETE][9] ([fdo#107713] / [fdo#108569]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/fi-icl-u4/igt@i915_selftest@live_hangcheck.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/fi-icl-u4/igt@i915_selftest@live_hangcheck.html

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][11] ([fdo#111407]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/fi-kbl-7500u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/fi-kbl-7500u/igt@[email protected]

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

[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#111934]: https://bugs.freedesktop.org/show_bug.cgi?id=111934
[fdo#111944]: https://bugs.freedesktop.org/show_bug.cgi?id=111944

Participating hosts (51 -> 42)
------------------------------

Missing (9): fi-ilk-m540 fi-cml-s fi-hsw-4200u fi-tgl-u2 fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus

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

* CI: CI-20190529 -> None
* Linux: CI_DRM_7136 -> Patchwork_14896

CI-20190529: 20190529
CI_DRM_7136: 6f7e6926bb09b1ec80c5a3d44a930d690dd09d9c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5234: 1205552397bd8a19dc6e5abdaa727cc091dabbfe @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14896: 5c039a1a525e71cceaec2107512c9a1d64140bcf @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

5c039a1a525e kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

✗ Fi.CI.IGT: failure for kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'

In reply to Changbin Du
== Series Details ==

== Series Details ==

Series: kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'
URL : https://patchwork.freedesktop.org/series/68277/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7136_full -> Patchwork_14896_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_14896_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_14896_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_14896_full:

### IGT changes ###

#### Possible regressions ####

* igt@gem_tiled_blits@interruptible:
- shard-glk: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-glk5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-glk4/igt@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@drm_import_export@import-close-race-flink:
- {shard-tglb}: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-tglb5/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-tglb5/igt@[email protected]

New tests
---------

New tests have been introduced between CI_DRM_7136_full and Patchwork_14896_full:

### New Piglit tests (5) ###

* spec@arb_gpu_shader5@texturegather@fs-rg-0-uint-cubearray:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s

* spec@arb_gpu_shader5@texturegather@fs-rg-1-uint-cubearray:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s

* spec@arb_gpu_shader5@texturegatheroffset@fs-rgb-0-uint-2darray-const:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s

* spec@arb_gpu_shader5@texturegatheroffset@fs-rgb-1-uint-2darray:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s

* spec@arb_gpu_shader5@texturegatheroffset@fs-rgb-1-uint-2darray-const:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@preempt-other-chain-bsd:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#111325]) +2 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb5/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@preempt-queue-bsd2:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276]) +6 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb6/igt@[email protected]

* igt@gem_persistent_relocs@forked-interruptible-thrash-inactive:
- shard-hsw: [PASS][9] -> [FAIL][10] ([fdo#112037])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-hsw5/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-hsw6/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap:
- shard-snb: [PASS][11] -> [DMESG-WARN][12] ([fdo#111870]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-snb1/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-snb1/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-hsw: [PASS][13] -> [DMESG-WARN][14] ([fdo#111870])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-hsw2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-hsw6/igt@[email protected]

* igt@i915_selftest@live_execlists:
- shard-kbl: [PASS][15] -> [INCOMPLETE][16] ([fdo#103665])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-kbl6/igt@i915_selftest@live_execlists.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-kbl3/igt@i915_selftest@live_execlists.html

* igt@i915_selftest@live_hangcheck:
- shard-snb: [PASS][17] -> [INCOMPLETE][18] ([fdo#105411])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-snb6/igt@i915_selftest@live_hangcheck.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-snb5/igt@i915_selftest@live_hangcheck.html

* igt@i915_suspend@sysfs-reader:
- shard-apl: [PASS][19] -> [DMESG-WARN][20] ([fdo#108566]) +4 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-apl8/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-apl4/igt@[email protected]

* igt@kms_concurrent@pipe-a:
- shard-skl: [PASS][21] -> [DMESG-WARN][22] ([fdo#106107])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-skl6/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-skl2/igt@[email protected]

* igt@kms_cursor_legacy@pipe-a-single-move:
- shard-iclb: [PASS][23] -> [INCOMPLETE][24] ([fdo#107713])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb6/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-wc:
- shard-snb: [PASS][25] -> [SKIP][26] ([fdo#109271]) +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-snb6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-wc.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-snb6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-wc.html

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-blt:
- shard-iclb: [PASS][27] -> [FAIL][28] ([fdo#103167]) +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb8/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb6/igt@[email protected]

* igt@kms_psr@psr2_sprite_blt:
- shard-iclb: [PASS][29] -> [SKIP][30] ([fdo#109441])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb2/igt@kms_psr@psr2_sprite_blt.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb6/igt@kms_psr@psr2_sprite_blt.html

* igt@kms_setmode@basic:
- shard-hsw: [PASS][31] -> [FAIL][32] ([fdo#99912])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-hsw5/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-hsw7/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_isolation@rcs0-s3:
- shard-apl: [DMESG-WARN][33] ([fdo#108566]) -> [PASS][34] +2 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-apl8/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-apl1/igt@[email protected]

* igt@gem_ctx_isolation@vecs0-s3:
- {shard-tglb}: [INCOMPLETE][35] ([fdo#111832]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-tglb3/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-tglb6/igt@[email protected]

* igt@gem_ctx_shared@q-smoketest-all:
- {shard-tglb}: [INCOMPLETE][37] ([fdo#111735]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-tglb6/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-tglb2/igt@[email protected]

* igt@gem_exec_flush@basic-batch-kernel-default-uc:
- shard-iclb: [INCOMPLETE][39] ([fdo#107713]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb1/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb2/igt@[email protected]

* igt@gem_exec_whisper@normal:
- {shard-tglb}: [INCOMPLETE][41] -> [PASS][42] +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-tglb8/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-tglb1/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-snb: [DMESG-WARN][43] ([fdo#111870]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-snb4/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-snb4/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap-after-close:
- shard-hsw: [DMESG-WARN][45] ([fdo#111870]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-hsw7/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-hsw5/igt@[email protected]

* igt@gem_workarounds@suspend-resume:
- {shard-tglb}: [INCOMPLETE][47] ([fdo#111832] / [fdo#111850]) -> [PASS][48] +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-tglb4/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-tglb6/igt@[email protected]

* igt@i915_pm_backlight@fade_with_suspend:
- shard-skl: [INCOMPLETE][49] ([fdo#104108]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-skl7/igt@i915_pm_backlight@fade_with_suspend.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-skl2/igt@i915_pm_backlight@fade_with_suspend.html

* igt@i915_pm_rpm@system-suspend:
- shard-skl: [INCOMPLETE][51] ([fdo#104108] / [fdo#107807]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-skl10/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-skl6/igt@[email protected]

* igt@i915_selftest@live_execlists:
- shard-skl: [INCOMPLETE][53] ([fdo#111934]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-skl10/igt@i915_selftest@live_execlists.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-skl5/igt@i915_selftest@live_execlists.html
- shard-apl: [INCOMPLETE][55] ([fdo#103927] / [fdo#112065]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-apl7/igt@i915_selftest@live_execlists.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-apl7/igt@i915_selftest@live_execlists.html

* igt@kms_big_fb@yf-tiled-32bpp-rotate-90:
- shard-apl: [INCOMPLETE][57] ([fdo#103927]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-apl3/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-apl4/igt@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank:
- shard-glk: [FAIL][59] ([fdo#105363]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-glk9/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-glk8/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-skl: [INCOMPLETE][61] ([fdo#109507]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-skl9/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-skl2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite:
- shard-iclb: [FAIL][63] ([fdo#103167]) -> [PASS][64] +4 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt:
- {shard-tglb}: [FAIL][65] ([fdo#103167]) -> [PASS][66] +3 similar issues
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-tglb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-tglb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt.html

* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [FAIL][67] ([fdo#108145]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-skl9/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-skl1/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [FAIL][69] ([fdo#103166]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb6/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb3/igt@[email protected]

* igt@kms_psr2_su@page_flip:
- shard-iclb: [SKIP][71] ([fdo#109642] / [fdo#111068]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb6/igt@kms_psr2_su@page_flip.html
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb2/igt@kms_psr2_su@page_flip.html

* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [SKIP][73] ([fdo#109441]) -> [PASS][74] +1 similar issue
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb1/igt@kms_psr@psr2_no_drrs.html
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

* igt@perf@oa-exponents:
- shard-glk: [FAIL][75] ([fdo#105483]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-glk5/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-glk4/igt@[email protected]

* igt@prime_busy@after-bsd2:
- shard-iclb: [SKIP][77] ([fdo#109276]) -> [PASS][78] +9 similar issues
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb6/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb2/igt@[email protected]

#### Warnings ####

* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [SKIP][79] ([fdo#109276]) -> [FAIL][80] ([fdo#111329])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb5/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb1/igt@[email protected]

* igt@gem_mocs_settings@mocs-rc6-bsd2:
- shard-iclb: [SKIP][81] ([fdo#109276]) -> [FAIL][82] ([fdo#111330])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7136/shard-iclb5/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb1/igt@[email protected]

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

[fdo# 112000 ]: https://bugs.freedesktop.org/show_bug.cgi?id= 112000 [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105483]: https://bugs.freedesktop.org/show_bug.cgi?id=105483
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110548]: https://bugs.freedesktop.org/show_bug.cgi?id=110548
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#111597]: https://bugs.freedesktop.org/show_bug.cgi?id=111597
[fdo#111646]: https://bugs.freedesktop.org/show_bug.cgi?id=111646
[fdo#111735]: https://bugs.freedesktop.org/show_bug.cgi?id=111735
[fdo#111781]: https://bugs.freedesktop.org/show_bug.cgi?id=111781
[fdo#111830 ]: https://bugs.freedesktop.org/show_bug.cgi?id=111830
[fdo#111832]: https://bugs.freedesktop.org/show_bug.cgi?id=111832
[fdo#111850]: https://bugs.freedesktop.org/show_bug.cgi?id=111850
[fdo#111865]: https://bugs.freedesktop.org/show_bug.cgi?id=111865
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#111934]: https://bugs.freedesktop.org/show_bug.cgi?id=111934
[fdo#112037]: https://bugs.freedesktop.org/show_bug.cgi?id=112037
[fdo#112065]: https://bugs.freedesktop.org/show_bug.cgi?id=112065
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (11 -> 11)
------------------------------

No changes in participating hosts

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

* CI: CI-20190529 -> None
* Linux: CI_DRM_7136 -> Patchwork_14896

CI-20190529: 20190529
CI_DRM_7136: 6f7e6926bb09b1ec80c5a3d44a930d690dd09d9c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5234: 1205552397bd8a19dc6e5abdaa727cc091dabbfe @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14896: 5c039a1a525e71cceaec2107512c9a1d64140bcf @ 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_14896/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer
#4 lore raw
In reply to Changbin Du
Quoted 7 lines · On Sun, 20 Oct 2019 21:17:17 +0800 Changbin Du <[email protected]> wrote:

The 'functions' directive is not only for functions, but also works for structs/unions. So the name is misleading. This patch renames it to 'identifiers', which specific the functions/types to be included in documentation. We keep the old name as an alias of the new one before all documentation are updated.

So I think this is basically OK, but I have one more request...

[...]

Quoted 28 lines
Documentation/sphinx/kerneldoc.py +3 -1
index 1159405cb920..0689f9c37f1e 100644
@@ -59,9 +59,10 @@ class KernelDocDirective(Directive):
     optional_arguments = 4
     option_spec = {
         'doc': directives.unchanged_required,
-        'functions': directives.unchanged,
         'export': directives.unchanged,
         'internal': directives.unchanged,
+        'identifiers': directives.unchanged,
+        'functions': directives.unchanged,  # alias of 'identifiers'
     }
     has_content = False
 
@@ -71,6 +72,7 @@ class KernelDocDirective(Directive):
 
         filename = env.config.kerneldoc_srctree + '/' + self.arguments[0]
         export_file_patterns = []
+        identifiers = None
 
         # Tell sphinx of the dependency
         env.note_dependency(os.path.abspath(filename))
@@ -86,19 +88,22 @@ class KernelDocDirective(Directive):
             export_file_patterns = str(self.options.get('internal')).split()
         elif 'doc' in self.options:
             cmd += ['-function', str(self.options.get('doc'))]

Documentation/sphinx/kerneldoc.py class KernelDocDirective(Directive): · line 94

Quoted 10 lines
Documentation/sphinx/kerneldoc.py +3 -6
+        elif 'identifiers' in self.options:
+            identifiers = self.options.get('identifiers').split()
         elif 'functions' in self.options:
-            functions = self.options.get('functions').split()
-            if functions:
-                for f in functions:
-                    cmd += ['-function', f]
-            else:
-                cmd += ['-no-doc-sections']
+            identifiers = self.options.get('functions').split()

Rather than do this, can you just change the elif line to read:

elif ('identifiers' in self.options) or ('functions' in self.options):

...then leave the rest of the code intact? It keeps the logic together, and avoids the confusing distinction between identifiers=='' and identifiers==None .

Thanks,

jon

Quoted 14 lines
Documentation/sphinx/kerneldoc.py +6 -0
         for pattern in export_file_patterns:
             for f in glob.glob(env.config.kerneldoc_srctree + '/' + pattern):
                 env.note_dependency(os.path.abspath(f))
                 cmd += ['-export-file', f]
 
+        if identifiers:
+            for i in identifiers:
+                cmd += ['-function', i]
+        elif identifiers is not None:
+            cmd += ['-no-doc-sections']
+
         cmd += [filename]
 
         try:
#5 lore raw
Quoted 56 lines · Jonathan Corbet
Quoted 7 lines · On Sun, 20 Oct 2019 21:17:17 +0800 Changbin Du <[email protected]> wrote:

The 'functions' directive is not only for functions, but also works for structs/unions. So the name is misleading. This patch renames it to 'identifiers', which specific the functions/types to be included in documentation. We keep the old name as an alias of the new one before all documentation are updated.

So I think this is basically OK, but I have one more request...

[...]

Quoted 28 lines
Documentation/sphinx/kerneldoc.py +3 -1
index 1159405cb920..0689f9c37f1e 100644
@@ -59,9 +59,10 @@ class KernelDocDirective(Directive):
     optional_arguments = 4
     option_spec = {
         'doc': directives.unchanged_required,
-        'functions': directives.unchanged,
         'export': directives.unchanged,
         'internal': directives.unchanged,
+        'identifiers': directives.unchanged,
+        'functions': directives.unchanged,  # alias of 'identifiers'
     }
     has_content = False
 
@@ -71,6 +72,7 @@ class KernelDocDirective(Directive):
 
         filename = env.config.kerneldoc_srctree + '/' + self.arguments[0]
         export_file_patterns = []
+        identifiers = None
 
         # Tell sphinx of the dependency
         env.note_dependency(os.path.abspath(filename))
@@ -86,19 +88,22 @@ class KernelDocDirective(Directive):
             export_file_patterns = str(self.options.get('internal')).split()
         elif 'doc' in self.options:
             cmd += ['-function', str(self.options.get('doc'))]

Documentation/sphinx/kerneldoc.py class KernelDocDirective(Directive): · line 94

Quoted 10 lines
Documentation/sphinx/kerneldoc.py +3 -6
+        elif 'identifiers' in self.options:
+            identifiers = self.options.get('identifiers').split()
         elif 'functions' in self.options:
-            functions = self.options.get('functions').split()
-            if functions:
-                for f in functions:
-                    cmd += ['-function', f]
-            else:
-                cmd += ['-no-doc-sections']
+            identifiers = self.options.get('functions').split()

Rather than do this, can you just change the elif line to read:

Quoted 5 lines

elif ('identifiers' in self.options) or ('functions' in self.options):

...then leave the rest of the code intact? It keeps the logic together, and avoids the confusing distinction between identifiers=='' and identifiers==None .

I think the problem is you still need to distinguish between the two for the get('functions') part.

One option is to rename 'functions' to 'identifiers' in the above block, and put something like this above the whole if ladder (untested):

        # backward compat
        if 'functions' in self.options:
            if 'identifiers' in self.options:
                kernellog.warn(env.app, "fail")
            else:
                self.options.set('identifiers', self.options.get('functions'))

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#6 lore raw
Quoted 66 lines · Jani Nikula
Quoted 56 lines · Jonathan Corbet
Quoted 7 lines · On Sun, 20 Oct 2019 21:17:17 +0800 Changbin Du <[email protected]> wrote:

The 'functions' directive is not only for functions, but also works for structs/unions. So the name is misleading. This patch renames it to 'identifiers', which specific the functions/types to be included in documentation. We keep the old name as an alias of the new one before all documentation are updated.

So I think this is basically OK, but I have one more request...

[...]

Quoted 28 lines
Documentation/sphinx/kerneldoc.py +3 -1
index 1159405cb920..0689f9c37f1e 100644
@@ -59,9 +59,10 @@ class KernelDocDirective(Directive):
     optional_arguments = 4
     option_spec = {
         'doc': directives.unchanged_required,
-        'functions': directives.unchanged,
         'export': directives.unchanged,
         'internal': directives.unchanged,
+        'identifiers': directives.unchanged,
+        'functions': directives.unchanged,  # alias of 'identifiers'
     }
     has_content = False
 
@@ -71,6 +72,7 @@ class KernelDocDirective(Directive):
 
         filename = env.config.kerneldoc_srctree + '/' + self.arguments[0]
         export_file_patterns = []
+        identifiers = None
 
         # Tell sphinx of the dependency
         env.note_dependency(os.path.abspath(filename))
@@ -86,19 +88,22 @@ class KernelDocDirective(Directive):
             export_file_patterns = str(self.options.get('internal')).split()
         elif 'doc' in self.options:
             cmd += ['-function', str(self.options.get('doc'))]

Documentation/sphinx/kerneldoc.py class KernelDocDirective(Directive): · line 94

Quoted 10 lines
Documentation/sphinx/kerneldoc.py +3 -6
+        elif 'identifiers' in self.options:
+            identifiers = self.options.get('identifiers').split()
         elif 'functions' in self.options:
-            functions = self.options.get('functions').split()
-            if functions:
-                for f in functions:
-                    cmd += ['-function', f]
-            else:
-                cmd += ['-no-doc-sections']
+            identifiers = self.options.get('functions').split()

Rather than do this, can you just change the elif line to read:

Quoted 5 lines

elif ('identifiers' in self.options) or ('functions' in self.options):

...then leave the rest of the code intact? It keeps the logic together, and avoids the confusing distinction between identifiers=='' and identifiers==None .

I think the problem is you still need to distinguish between the two for the get('functions') part.

Quoted 7 lines

One option is to rename 'functions' to 'identifiers' in the above block, and put something like this above the whole if ladder (untested):

        # backward compat
        if 'functions' in self.options:
            if 'identifiers' in self.options:
                kernellog.warn(env.app, "fail")

This will miss the content of 'functions' directive if both exist in same doc.

Quoted 6 lines

else:
self.options.set('identifiers', self.options.get('functions'))

BR,
Jani.

After comparing, I still perfer my original code which is simpler. :)

Quoted 3 lines
Signature · 2 lines
-- 
Jani Nikula, Intel Open Source Graphics Center
Signature · 2 lines
Cheers,
Changbin Du
#7 lore raw
Quoted 70 lines · Changbin Du
Quoted 69 lines · Jani Nikula
Quoted 56 lines · Jonathan Corbet
Quoted 7 lines · On Sun, 20 Oct 2019 21:17:17 +0800 Changbin Du…

The 'functions' directive is not only for functions, but also works for structs/unions. So the name is misleading. This patch renames it to 'identifiers', which specific the functions/types to be included in documentation. We keep the old name as an alias of the new one before all documentation are updated.

So I think this is basically OK, but I have one more request...

[...]

Quoted 28 lines
Documentation/sphinx/kerneldoc.py +3 -1
index 1159405cb920..0689f9c37f1e 100644
@@ -59,9 +59,10 @@ class KernelDocDirective(Directive):
     optional_arguments = 4
     option_spec = {
         'doc': directives.unchanged_required,
-        'functions': directives.unchanged,
         'export': directives.unchanged,
         'internal': directives.unchanged,
+        'identifiers': directives.unchanged,
+        'functions': directives.unchanged,  # alias of 'identifiers'
     }
     has_content = False
 
@@ -71,6 +72,7 @@ class KernelDocDirective(Directive):
 
         filename = env.config.kerneldoc_srctree + '/' + self.arguments[0]
         export_file_patterns = []
+        identifiers = None
 
         # Tell sphinx of the dependency
         env.note_dependency(os.path.abspath(filename))
@@ -86,19 +88,22 @@ class KernelDocDirective(Directive):
             export_file_patterns = str(self.options.get('internal')).split()
         elif 'doc' in self.options:
             cmd += ['-function', str(self.options.get('doc'))]

Documentation/sphinx/kerneldoc.py class KernelDocDirective(Directive): · line 94

Quoted 10 lines
Documentation/sphinx/kerneldoc.py +3 -6
+        elif 'identifiers' in self.options:
+            identifiers = self.options.get('identifiers').split()
         elif 'functions' in self.options:
-            functions = self.options.get('functions').split()
-            if functions:
-                for f in functions:
-                    cmd += ['-function', f]
-            else:
-                cmd += ['-no-doc-sections']
+            identifiers = self.options.get('functions').split()

Rather than do this, can you just change the elif line to read:

Quoted 5 lines

elif ('identifiers' in self.options) or ('functions' in self.options):

...then leave the rest of the code intact? It keeps the logic together, and avoids the confusing distinction between identifiers=='' and identifiers==None .

I think the problem is you still need to distinguish between the two for the get('functions') part.

One option is to rename 'functions' to 'identifiers' in the above block, and put something like this above the whole if ladder (untested):

Quoted 6 lines
Quoted 4 lines
        # backward compat
        if 'functions' in self.options:
            if 'identifiers' in self.options:
                kernellog.warn(env.app, "fail")

This will miss the content of 'functions' directive if both exist in same doc.

Did you not notice your patch does the same, except silently, while this would produce a warning? Which one is less surprising?

Quoted 8 lines
Quoted 7 lines

else:
self.options.set('identifiers', self.options.get('functions'))

BR,
Jani.

After comparing, I still perfer my original code which is simpler. :)

But is it, really? I agree with Jon about the distinction between None and '' being confusing.

BR,
Jani.

Quoted 4 lines
Quoted 4 lines
Signature · 2 lines
-- 
Jani Nikula, Intel Open Source Graphics Center
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#8 lore raw
Quoted 75 lines · Jani Nikula
Quoted 74 lines · Changbin Du
Quoted 73 lines · Jani Nikula
Quoted 56 lines · Jonathan Corbet
Quoted 7 lines · On Sun, 20 Oct 2019 21:17:17 +0800 Changbin Du <[email protected]> wrote:

The 'functions' directive is not only for functions, but also works for structs/unions. So the name is misleading. This patch renames it to 'identifiers', which specific the functions/types to be included in documentation. We keep the old name as an alias of the new one before all documentation are updated.

So I think this is basically OK, but I have one more request...

[...]

Quoted 28 lines
Documentation/sphinx/kerneldoc.py +3 -1
index 1159405cb920..0689f9c37f1e 100644
@@ -59,9 +59,10 @@ class KernelDocDirective(Directive):
     optional_arguments = 4
     option_spec = {
         'doc': directives.unchanged_required,
-        'functions': directives.unchanged,
         'export': directives.unchanged,
         'internal': directives.unchanged,
+        'identifiers': directives.unchanged,
+        'functions': directives.unchanged,  # alias of 'identifiers'
     }
     has_content = False
 
@@ -71,6 +72,7 @@ class KernelDocDirective(Directive):
 
         filename = env.config.kerneldoc_srctree + '/' + self.arguments[0]
         export_file_patterns = []
+        identifiers = None
 
         # Tell sphinx of the dependency
         env.note_dependency(os.path.abspath(filename))
@@ -86,19 +88,22 @@ class KernelDocDirective(Directive):
             export_file_patterns = str(self.options.get('internal')).split()
         elif 'doc' in self.options:
             cmd += ['-function', str(self.options.get('doc'))]

Documentation/sphinx/kerneldoc.py class KernelDocDirective(Directive): · line 94

Quoted 10 lines
Documentation/sphinx/kerneldoc.py +3 -6
+        elif 'identifiers' in self.options:
+            identifiers = self.options.get('identifiers').split()
         elif 'functions' in self.options:
-            functions = self.options.get('functions').split()
-            if functions:
-                for f in functions:
-                    cmd += ['-function', f]
-            else:
-                cmd += ['-no-doc-sections']
+            identifiers = self.options.get('functions').split()

Rather than do this, can you just change the elif line to read:

Quoted 5 lines

elif ('identifiers' in self.options) or ('functions' in self.options):

...then leave the rest of the code intact? It keeps the logic together, and avoids the confusing distinction between identifiers=='' and identifiers==None .

I think the problem is you still need to distinguish between the two for the get('functions') part.

One option is to rename 'functions' to 'identifiers' in the above block, and put something like this above the whole if ladder (untested):

        # backward compat
        if 'functions' in self.options:
            if 'identifiers' in self.options:
                kernellog.warn(env.app, "fail")
Quoted 6 lines
Quoted 2 lines

This will miss the content of 'functions' directive if both exist in same doc.

Did you not notice your patch does the same, except silently, while this would produce a warning? Which one is less surprising?

yes, my mistake. Mine does the same thing.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

else:
self.options.set('identifiers', self.options.get('functions'))

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

BR,
Jani.

After comparing, I still perfer my original code which is simpler. :)

But is it, really? I agree with Jon about the distinction between None and '' being confusing.

Here python is different from C. Both empty string and None are False in python. Note such condition is common in python.

Again, I am ok with both.

Quoted 13 lines

BR,
Jani.

Quoted 4 lines
Quoted 4 lines
Signature · 2 lines
-- 
Jani Nikula, Intel Open Source Graphics Center
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Signature · 2 lines
Cheers,
Changbin Du
#9 lore raw

Am 29.10.19 um 01:31 schrieb Changbin Du:

Quoted 5 lines
Quoted 3 lines

But is it, really? I agree with Jon about the distinction between None and '' being confusing.

Here python is different from C. Both empty string and None are False in python. Note such condition is common in python.

The one is a empty string str(''), its bool('') value is False.

| >>> type(''), bool('')
| (<class 'str'>, False)

The other is a NoneType, its bool(None) value is False.

| >>> type(None), bool(None)
| (<class 'NoneType'>, False)

None often used like NULL (pointer). E.g if a function does not give an explicit return value, the returned value is None.

| >>> def foo():
| ...     pass
| ...
| >>> print(foo())
| None

-- Markus --

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer
#10 lore raw
In reply to Changbin Du
Quoted 2 lines · On Tue, 29 Oct 2019 08:31:22 +0800 Changbin Du…

Here python is different from C. Both empty string and None are False in python. Note such condition is common in python.

Treating both as a False value is reasonably common. Treating them elsewhere in the same code block as separate values is less so; that's the part I would prefer to avoid.

Thanks,

jon

#11 lore raw
Quoted 10 lines · Jonathan Corbet
Quoted 2 lines · On Tue, 29 Oct 2019 08:31:22 +0800 Changbin Du <[email protected]> wrote:

Here python is different from C. Both empty string and None are False in python. Note such condition is common in python.

Treating both as a False value is reasonably common. Treating them elsewhere in the same code block as separate values is less so; that's the part I would prefer to avoid.

ok, please check update in v3.

Quoted 3 lines

Thanks,

jon

Signature · 2 lines
Cheers,
Changbin Du