* [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-20 13:17 Changbin Du 2019-10-20 18:05 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork ` (3 more replies) 0 siblings, 4 replies; 32+ messages in thread From: Changbin Du @ 2019-10-20 13:17 UTC (permalink / raw) To: Jonathan Corbet Cc: linux-pci, linux-doc, linux-kernel, linux-mm, linux-crypto, linux-kselftest, linux-wireless, linux-fpga, linux-usb, dri-devel, intel-gfx, Matthew Wilcox, jani.nikula, Thomas Zimmermann, 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. Signed-off-by: Changbin Du <changbin.du@gmail.com> --- 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(-) diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst index 192c36af39e2..fff6604631ea 100644 --- a/Documentation/doc-guide/kernel-doc.rst +++ b/Documentation/doc-guide/kernel-doc.rst @@ -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. diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py index 1159405cb920..0689f9c37f1e 100644 --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -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: -- 2.20.1 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' 2019-10-20 13:17 [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' Changbin Du @ 2019-10-20 18:05 ` Patchwork 2019-10-20 18:35 ` ✓ Fi.CI.BAT: success " Patchwork ` (2 subsequent siblings) 3 siblings, 0 replies; 32+ messages in thread From: Patchwork @ 2019-10-20 18:05 UTC (permalink / raw) To: Changbin Du; +Cc: intel-gfx == 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 <changbin.du@intel.com>' total: 0 errors, 1 warnings, 0 checks, 87 lines checked _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* ✓ Fi.CI.BAT: success for kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' 2019-10-20 13:17 [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' Changbin Du 2019-10-20 18:05 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork @ 2019-10-20 18:35 ` Patchwork 2019-10-20 20:14 ` ✗ Fi.CI.IGT: failure " Patchwork 2019-10-24 18:19 ` Jonathan Corbet 3 siblings, 0 replies; 32+ messages in thread From: Patchwork @ 2019-10-20 18:35 UTC (permalink / raw) To: Changbin Du; +Cc: intel-gfx == 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@gem_ctx_create@basic.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/fi-icl-u3/igt@gem_ctx_create@basic.html * 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@gem_ctx_switch@legacy-render.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/fi-icl-u3/igt@gem_ctx_switch@legacy-render.html * 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@kms_chamelium@hdmi-hpd-fast.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html {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 Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* ✗ Fi.CI.IGT: failure for kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' 2019-10-20 13:17 [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' Changbin Du 2019-10-20 18:05 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork 2019-10-20 18:35 ` ✓ Fi.CI.BAT: success " Patchwork @ 2019-10-20 20:14 ` Patchwork 2019-10-24 18:19 ` Jonathan Corbet 3 siblings, 0 replies; 32+ messages in thread From: Patchwork @ 2019-10-20 20:14 UTC (permalink / raw) To: Changbin Du; +Cc: intel-gfx == 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@gem_tiled_blits@interruptible.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-glk4/igt@gem_tiled_blits@interruptible.html #### 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@drm_import_export@import-close-race-flink.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-tglb5/igt@drm_import_export@import-close-race-flink.html 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@gem_exec_schedule@preempt-other-chain-bsd.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb1/igt@gem_exec_schedule@preempt-other-chain-bsd.html * 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@gem_exec_schedule@preempt-queue-bsd2.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb6/igt@gem_exec_schedule@preempt-queue-bsd2.html * 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@gem_persistent_relocs@forked-interruptible-thrash-inactive.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-hsw6/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html * 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@gem_userptr_blits@sync-unmap.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-snb1/igt@gem_userptr_blits@sync-unmap.html * 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@gem_userptr_blits@sync-unmap-cycles.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-hsw6/igt@gem_userptr_blits@sync-unmap-cycles.html * 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@i915_suspend@sysfs-reader.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-apl4/igt@i915_suspend@sysfs-reader.html * 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@kms_concurrent@pipe-a.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-skl2/igt@kms_concurrent@pipe-a.html * 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@kms_cursor_legacy@pipe-a-single-move.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb7/igt@kms_cursor_legacy@pipe-a-single-move.html * 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@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-blt.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-blt.html * 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@kms_setmode@basic.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-hsw7/igt@kms_setmode@basic.html #### 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@gem_ctx_isolation@rcs0-s3.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-apl1/igt@gem_ctx_isolation@rcs0-s3.html * 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@gem_ctx_isolation@vecs0-s3.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-tglb6/igt@gem_ctx_isolation@vecs0-s3.html * 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@gem_ctx_shared@q-smoketest-all.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-tglb2/igt@gem_ctx_shared@q-smoketest-all.html * 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@gem_exec_flush@basic-batch-kernel-default-uc.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb2/igt@gem_exec_flush@basic-batch-kernel-default-uc.html * 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@gem_exec_whisper@normal.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-tglb1/igt@gem_exec_whisper@normal.html * 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@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-snb4/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html * 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@gem_userptr_blits@sync-unmap-after-close.html [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-hsw5/igt@gem_userptr_blits@sync-unmap-after-close.html * 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@gem_workarounds@suspend-resume.html [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-tglb6/igt@gem_workarounds@suspend-resume.html * 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@i915_pm_rpm@system-suspend.html [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-skl6/igt@i915_pm_rpm@system-suspend.html * 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@kms_big_fb@yf-tiled-32bpp-rotate-90.html [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-apl4/igt@kms_big_fb@yf-tiled-32bpp-rotate-90.html * 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@kms_flip@2x-flip-vs-expired-vblank.html [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-glk8/igt@kms_flip@2x-flip-vs-expired-vblank.html * 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@kms_flip@flip-vs-suspend-interruptible.html [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-skl2/igt@kms_flip@flip-vs-suspend-interruptible.html * 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@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-skl1/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html * 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@kms_plane_lowres@pipe-a-tiling-x.html [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb3/igt@kms_plane_lowres@pipe-a-tiling-x.html * 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@perf@oa-exponents.html [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-glk4/igt@perf@oa-exponents.html * 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@prime_busy@after-bsd2.html [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb2/igt@prime_busy@after-bsd2.html #### 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@gem_ctx_isolation@vcs1-nonpriv.html [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb1/igt@gem_ctx_isolation@vcs1-nonpriv.html * 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@gem_mocs_settings@mocs-rc6-bsd2.html [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14896/shard-iclb1/igt@gem_mocs_settings@mocs-rc6-bsd2.html {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 Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-24 18:19 ` Jonathan Corbet 0 siblings, 0 replies; 32+ messages in thread From: Jonathan Corbet @ 2019-10-24 18:19 UTC (permalink / raw) To: Changbin Du Cc: linux-pci, linux-doc, linux-kernel, linux-mm, linux-crypto, linux-kselftest, linux-wireless, linux-fpga, linux-usb, dri-devel, intel-gfx, Matthew Wilcox, jani.nikula, Thomas Zimmermann On Sun, 20 Oct 2019 21:17:17 +0800 Changbin Du <changbin.du@gmail.com> 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. > > Signed-off-by: Changbin Du <changbin.du@gmail.com> So I think this is basically OK, but I have one more request... [...] > diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py > index 1159405cb920..0689f9c37f1e 100644 > --- a/Documentation/sphinx/kerneldoc.py > +++ b/Documentation/sphinx/kerneldoc.py > @@ -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() 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 > 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: ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-24 18:19 ` Jonathan Corbet 0 siblings, 0 replies; 32+ messages in thread From: Jonathan Corbet @ 2019-10-24 18:19 UTC (permalink / raw) To: Changbin Du Cc: Matthew Wilcox, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, linux-usb, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx On Sun, 20 Oct 2019 21:17:17 +0800 Changbin Du <changbin.du@gmail.com> 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. > > Signed-off-by: Changbin Du <changbin.du@gmail.com> So I think this is basically OK, but I have one more request... [...] > diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py > index 1159405cb920..0689f9c37f1e 100644 > --- a/Documentation/sphinx/kerneldoc.py > +++ b/Documentation/sphinx/kerneldoc.py > @@ -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() 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 > 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: _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-24 18:19 ` Jonathan Corbet 0 siblings, 0 replies; 32+ messages in thread From: Jonathan Corbet @ 2019-10-24 18:19 UTC (permalink / raw) To: Changbin Du Cc: Matthew Wilcox, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, linux-usb, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx On Sun, 20 Oct 2019 21:17:17 +0800 Changbin Du <changbin.du@gmail.com> 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. > > Signed-off-by: Changbin Du <changbin.du@gmail.com> So I think this is basically OK, but I have one more request... [...] > diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py > index 1159405cb920..0689f9c37f1e 100644 > --- a/Documentation/sphinx/kerneldoc.py > +++ b/Documentation/sphinx/kerneldoc.py > @@ -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() 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 > 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: _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-25 6:57 ` Jani Nikula 0 siblings, 0 replies; 32+ messages in thread From: Jani Nikula @ 2019-10-25 6:57 UTC (permalink / raw) To: Jonathan Corbet, Changbin Du Cc: linux-pci, linux-doc, linux-kernel, linux-mm, linux-crypto, linux-kselftest, linux-wireless, linux-fpga, linux-usb, dri-devel, intel-gfx, Matthew Wilcox, Thomas Zimmermann On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: > On Sun, 20 Oct 2019 21:17:17 +0800 > Changbin Du <changbin.du@gmail.com> 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. >> >> Signed-off-by: Changbin Du <changbin.du@gmail.com> > > So I think this is basically OK, but I have one more request... > > [...] > >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py >> index 1159405cb920..0689f9c37f1e 100644 >> --- a/Documentation/sphinx/kerneldoc.py >> +++ b/Documentation/sphinx/kerneldoc.py >> @@ -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() > > 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 . 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. -- Jani Nikula, Intel Open Source Graphics Center ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-25 6:57 ` Jani Nikula 0 siblings, 0 replies; 32+ messages in thread From: Jani Nikula @ 2019-10-25 6:57 UTC (permalink / raw) To: Jonathan Corbet, Changbin Du Cc: Matthew Wilcox, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, linux-usb, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: > On Sun, 20 Oct 2019 21:17:17 +0800 > Changbin Du <changbin.du@gmail.com> 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. >> >> Signed-off-by: Changbin Du <changbin.du@gmail.com> > > So I think this is basically OK, but I have one more request... > > [...] > >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py >> index 1159405cb920..0689f9c37f1e 100644 >> --- a/Documentation/sphinx/kerneldoc.py >> +++ b/Documentation/sphinx/kerneldoc.py >> @@ -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() > > 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 . 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. -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-25 6:57 ` Jani Nikula 0 siblings, 0 replies; 32+ messages in thread From: Jani Nikula @ 2019-10-25 6:57 UTC (permalink / raw) To: Jonathan Corbet, Changbin Du Cc: Matthew Wilcox, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, linux-usb, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: > On Sun, 20 Oct 2019 21:17:17 +0800 > Changbin Du <changbin.du@gmail.com> 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. >> >> Signed-off-by: Changbin Du <changbin.du@gmail.com> > > So I think this is basically OK, but I have one more request... > > [...] > >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py >> index 1159405cb920..0689f9c37f1e 100644 >> --- a/Documentation/sphinx/kerneldoc.py >> +++ b/Documentation/sphinx/kerneldoc.py >> @@ -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() > > 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 . 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. -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-25 14:48 ` Changbin Du 0 siblings, 0 replies; 32+ messages in thread From: Changbin Du @ 2019-10-25 14:48 UTC (permalink / raw) To: Jani Nikula Cc: Jonathan Corbet, Changbin Du, linux-pci, linux-doc, linux-kernel, linux-mm, linux-crypto, linux-kselftest, linux-wireless, linux-fpga, linux-usb, dri-devel, intel-gfx, Matthew Wilcox, Thomas Zimmermann On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: > On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: > > On Sun, 20 Oct 2019 21:17:17 +0800 > > Changbin Du <changbin.du@gmail.com> 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. > >> > >> Signed-off-by: Changbin Du <changbin.du@gmail.com> > > > > So I think this is basically OK, but I have one more request... > > > > [...] > > > >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py > >> index 1159405cb920..0689f9c37f1e 100644 > >> --- a/Documentation/sphinx/kerneldoc.py > >> +++ b/Documentation/sphinx/kerneldoc.py > >> @@ -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() > > > > 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 . > > 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") This will miss the content of 'functions' directive if both exist in same doc. > else: > self.options.set('identifiers', self.options.get('functions')) > > BR, > Jani. > After comparing, I still perfer my original code which is simpler. :) > > -- > Jani Nikula, Intel Open Source Graphics Center -- Cheers, Changbin Du ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-25 14:48 ` Changbin Du 0 siblings, 0 replies; 32+ messages in thread From: Changbin Du @ 2019-10-25 14:48 UTC (permalink / raw) To: Jani Nikula Cc: linux-usb, Matthew Wilcox, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, Jonathan Corbet, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx, Changbin Du On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: > On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: > > On Sun, 20 Oct 2019 21:17:17 +0800 > > Changbin Du <changbin.du@gmail.com> 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. > >> > >> Signed-off-by: Changbin Du <changbin.du@gmail.com> > > > > So I think this is basically OK, but I have one more request... > > > > [...] > > > >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py > >> index 1159405cb920..0689f9c37f1e 100644 > >> --- a/Documentation/sphinx/kerneldoc.py > >> +++ b/Documentation/sphinx/kerneldoc.py > >> @@ -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() > > > > 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 . > > 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") This will miss the content of 'functions' directive if both exist in same doc. > else: > self.options.set('identifiers', self.options.get('functions')) > > BR, > Jani. > After comparing, I still perfer my original code which is simpler. :) > > -- > Jani Nikula, Intel Open Source Graphics Center -- Cheers, Changbin Du _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-25 14:48 ` Changbin Du 0 siblings, 0 replies; 32+ messages in thread From: Changbin Du @ 2019-10-25 14:48 UTC (permalink / raw) To: Jani Nikula Cc: linux-usb, Matthew Wilcox, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, Jonathan Corbet, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx, Changbin Du On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: > On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: > > On Sun, 20 Oct 2019 21:17:17 +0800 > > Changbin Du <changbin.du@gmail.com> 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. > >> > >> Signed-off-by: Changbin Du <changbin.du@gmail.com> > > > > So I think this is basically OK, but I have one more request... > > > > [...] > > > >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py > >> index 1159405cb920..0689f9c37f1e 100644 > >> --- a/Documentation/sphinx/kerneldoc.py > >> +++ b/Documentation/sphinx/kerneldoc.py > >> @@ -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() > > > > 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 . > > 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") This will miss the content of 'functions' directive if both exist in same doc. > else: > self.options.set('identifiers', self.options.get('functions')) > > BR, > Jani. > After comparing, I still perfer my original code which is simpler. :) > > -- > Jani Nikula, Intel Open Source Graphics Center -- Cheers, Changbin Du _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' 2019-10-25 14:48 ` Changbin Du ` (2 preceding siblings ...) (?) @ 2019-10-28 9:24 ` Jani Nikula -1 siblings, 0 replies; 32+ messages in thread From: Jani Nikula @ 2019-10-28 9:24 UTC (permalink / raw) To: Changbin Du Cc: Jonathan Corbet, Changbin Du, linux-pci, linux-doc, linux-kernel, linux-mm, linux-crypto, linux-kselftest, linux-wireless, linux-fpga, linux-usb, dri-devel, intel-gfx, Matthew Wilcox, Thomas Zimmermann On Fri, 25 Oct 2019, Changbin Du <changbin.du@gmail.com> wrote: > On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: >> On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: >> > On Sun, 20 Oct 2019 21:17:17 +0800 >> > Changbin Du <changbin.du@gmail.com> 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. >> >> >> >> Signed-off-by: Changbin Du <changbin.du@gmail.com> >> > >> > So I think this is basically OK, but I have one more request... >> > >> > [...] >> > >> >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py >> >> index 1159405cb920..0689f9c37f1e 100644 >> >> --- a/Documentation/sphinx/kerneldoc.py >> >> +++ b/Documentation/sphinx/kerneldoc.py >> >> @@ -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() >> > >> > 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 . >> >> 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") > 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? > >> 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. > >> >> -- >> Jani Nikula, Intel Open Source Graphics Center -- Jani Nikula, Intel Open Source Graphics Center ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-28 9:24 ` Jani Nikula 0 siblings, 0 replies; 32+ messages in thread From: Jani Nikula @ 2019-10-28 9:24 UTC (permalink / raw) To: Changbin Du Cc: linux-usb, Matthew Wilcox, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, Jonathan Corbet, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx, Changbin Du On Fri, 25 Oct 2019, Changbin Du <changbin.du@gmail.com> wrote: > On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: >> On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: >> > On Sun, 20 Oct 2019 21:17:17 +0800 >> > Changbin Du <changbin.du@gmail.com> 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. >> >> >> >> Signed-off-by: Changbin Du <changbin.du@gmail.com> >> > >> > So I think this is basically OK, but I have one more request... >> > >> > [...] >> > >> >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py >> >> index 1159405cb920..0689f9c37f1e 100644 >> >> --- a/Documentation/sphinx/kerneldoc.py >> >> +++ b/Documentation/sphinx/kerneldoc.py >> >> @@ -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() >> > >> > 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 . >> >> 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") > 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? > >> 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. > >> >> -- >> Jani Nikula, Intel Open Source Graphics Center -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-28 9:24 ` Jani Nikula 0 siblings, 0 replies; 32+ messages in thread From: Jani Nikula @ 2019-10-28 9:24 UTC (permalink / raw) To: Changbin Du Cc: linux-usb, Matthew Wilcox, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, Jonathan Corbet, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx, Changbin Du On Fri, 25 Oct 2019, Changbin Du <changbin.du@gmail.com> wrote: > On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: >> On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: >> > On Sun, 20 Oct 2019 21:17:17 +0800 >> > Changbin Du <changbin.du@gmail.com> 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. >> >> >> >> Signed-off-by: Changbin Du <changbin.du@gmail.com> >> > >> > So I think this is basically OK, but I have one more request... >> > >> > [...] >> > >> >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py >> >> index 1159405cb920..0689f9c37f1e 100644 >> >> --- a/Documentation/sphinx/kerneldoc.py >> >> +++ b/Documentation/sphinx/kerneldoc.py >> >> @@ -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() >> > >> > 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 . >> >> 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") > 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? > >> 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. > >> >> -- >> Jani Nikula, Intel Open Source Graphics Center -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-28 9:24 ` Jani Nikula 0 siblings, 0 replies; 32+ messages in thread From: Jani Nikula @ 2019-10-28 9:24 UTC (permalink / raw) Cc: Jonathan Corbet, Changbin Du, linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg, linux-crypto-u79uwXL29TY76Z2rM5mHXA, linux-kselftest-u79uwXL29TY76Z2rM5mHXA, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-fpga-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Matthew Wilcox, Thomas Zimmermann On Fri, 25 Oct 2019, Changbin Du <changbin.du-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: >> On Thu, 24 Oct 2019, Jonathan Corbet <corbet-T1hC0tSOHrs@public.gmane.org> wrote: >> > On Sun, 20 Oct 2019 21:17:17 +0800 >> > Changbin Du <changbin.du-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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. >> >> >> >> Signed-off-by: Changbin Du <changbin.du-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> > >> > So I think this is basically OK, but I have one more request... >> > >> > [...] >> > >> >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py >> >> index 1159405cb920..0689f9c37f1e 100644 >> >> --- a/Documentation/sphinx/kerneldoc.py >> >> +++ b/Documentation/sphinx/kerneldoc.py >> >> @@ -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() >> > >> > 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 . >> >> 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") > 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? > >> 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. > >> >> -- >> Jani Nikula, Intel Open Source Graphics Center -- Jani Nikula, Intel Open Source Graphics Center ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-28 9:24 ` Jani Nikula 0 siblings, 0 replies; 32+ messages in thread From: Jani Nikula @ 2019-10-28 9:24 UTC (permalink / raw) To: Changbin Du Cc: Jonathan Corbet, linux-pci, linux-doc, linux-kernel, linux-mm, linux-crypto, linux-kselftest, linux-wireless, linux-fpga, linux-usb, dri-devel, intel-gfx, Matthew Wilcox, Thomas Zimmermann On Fri, 25 Oct 2019, Changbin Du <changbin.du@gmail.com> wrote: > On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: >> On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: >> > On Sun, 20 Oct 2019 21:17:17 +0800 >> > Changbin Du <changbin.du@gmail.com> 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. >> >> >> >> Signed-off-by: Changbin Du <changbin.du@gmail.com> >> > >> > So I think this is basically OK, but I have one more request... >> > >> > [...] >> > >> >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py >> >> index 1159405cb920..0689f9c37f1e 100644 >> >> --- a/Documentation/sphinx/kerneldoc.py >> >> +++ b/Documentation/sphinx/kerneldoc.py >> >> @@ -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() >> > >> > 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 . >> >> 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") > 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? > >> 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. > >> >> -- >> Jani Nikula, Intel Open Source Graphics Center -- Jani Nikula, Intel Open Source Graphics Center ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-29 0:31 ` Changbin Du 0 siblings, 0 replies; 32+ messages in thread From: Changbin Du @ 2019-10-29 0:31 UTC (permalink / raw) To: Jani Nikula Cc: Changbin Du, Jonathan Corbet, linux-pci, linux-doc, linux-kernel, linux-mm, linux-crypto, linux-kselftest, linux-wireless, linux-fpga, linux-usb, dri-devel, intel-gfx, Matthew Wilcox, Thomas Zimmermann On Mon, Oct 28, 2019 at 11:24:22AM +0200, Jani Nikula wrote: > On Fri, 25 Oct 2019, Changbin Du <changbin.du@gmail.com> wrote: > > On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: > >> On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: > >> > On Sun, 20 Oct 2019 21:17:17 +0800 > >> > Changbin Du <changbin.du@gmail.com> 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. > >> >> > >> >> Signed-off-by: Changbin Du <changbin.du@gmail.com> > >> > > >> > So I think this is basically OK, but I have one more request... > >> > > >> > [...] > >> > > >> >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py > >> >> index 1159405cb920..0689f9c37f1e 100644 > >> >> --- a/Documentation/sphinx/kerneldoc.py > >> >> +++ b/Documentation/sphinx/kerneldoc.py > >> >> @@ -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() > >> > > >> > 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 . > >> > >> 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") > > 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. > > > >> 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. > 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. > > BR, > Jani. > > > > > > >> > >> -- > >> Jani Nikula, Intel Open Source Graphics Center > > -- > Jani Nikula, Intel Open Source Graphics Center -- Cheers, Changbin Du ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-29 0:31 ` Changbin Du 0 siblings, 0 replies; 32+ messages in thread From: Changbin Du @ 2019-10-29 0:31 UTC (permalink / raw) To: Jani Nikula Cc: linux-usb, Matthew Wilcox, Thomas Zimmermann, Jonathan Corbet, linux-pci, linux-fpga, linux-doc, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx, Changbin Du On Mon, Oct 28, 2019 at 11:24:22AM +0200, Jani Nikula wrote: > On Fri, 25 Oct 2019, Changbin Du <changbin.du@gmail.com> wrote: > > On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: > >> On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: > >> > On Sun, 20 Oct 2019 21:17:17 +0800 > >> > Changbin Du <changbin.du@gmail.com> 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. > >> >> > >> >> Signed-off-by: Changbin Du <changbin.du@gmail.com> > >> > > >> > So I think this is basically OK, but I have one more request... > >> > > >> > [...] > >> > > >> >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py > >> >> index 1159405cb920..0689f9c37f1e 100644 > >> >> --- a/Documentation/sphinx/kerneldoc.py > >> >> +++ b/Documentation/sphinx/kerneldoc.py > >> >> @@ -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() > >> > > >> > 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 . > >> > >> 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") > > 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. > > > >> 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. > 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. > > BR, > Jani. > > > > > > >> > >> -- > >> Jani Nikula, Intel Open Source Graphics Center > > -- > Jani Nikula, Intel Open Source Graphics Center -- Cheers, Changbin Du _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-29 0:31 ` Changbin Du 0 siblings, 0 replies; 32+ messages in thread From: Changbin Du @ 2019-10-29 0:31 UTC (permalink / raw) To: Jani Nikula Cc: linux-usb, Matthew Wilcox, Thomas Zimmermann, Jonathan Corbet, linux-pci, linux-fpga, linux-doc, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx, Changbin Du On Mon, Oct 28, 2019 at 11:24:22AM +0200, Jani Nikula wrote: > On Fri, 25 Oct 2019, Changbin Du <changbin.du@gmail.com> wrote: > > On Fri, Oct 25, 2019 at 09:57:48AM +0300, Jani Nikula wrote: > >> On Thu, 24 Oct 2019, Jonathan Corbet <corbet@lwn.net> wrote: > >> > On Sun, 20 Oct 2019 21:17:17 +0800 > >> > Changbin Du <changbin.du@gmail.com> 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. > >> >> > >> >> Signed-off-by: Changbin Du <changbin.du@gmail.com> > >> > > >> > So I think this is basically OK, but I have one more request... > >> > > >> > [...] > >> > > >> >> diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py > >> >> index 1159405cb920..0689f9c37f1e 100644 > >> >> --- a/Documentation/sphinx/kerneldoc.py > >> >> +++ b/Documentation/sphinx/kerneldoc.py > >> >> @@ -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() > >> > > >> > 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 . > >> > >> 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") > > 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. > > > >> 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. > 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. > > BR, > Jani. > > > > > > >> > >> -- > >> Jani Nikula, Intel Open Source Graphics Center > > -- > Jani Nikula, Intel Open Source Graphics Center -- Cheers, Changbin Du _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' 2019-10-29 0:31 ` Changbin Du (?) (?) @ 2019-10-29 5:42 ` Markus Heiser -1 siblings, 0 replies; 32+ messages in thread From: Markus Heiser @ 2019-10-29 5:42 UTC (permalink / raw) To: Changbin Du, Jani Nikula Cc: Jonathan Corbet, linux-pci, linux-doc, linux-kernel, linux-mm, linux-crypto, linux-kselftest, linux-wireless, linux-fpga, linux-usb, dri-devel, intel-gfx, Matthew Wilcox, Thomas Zimmermann Am 29.10.19 um 01:31 schrieb Changbin Du: >> 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 -- ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-29 5:42 ` Markus Heiser 0 siblings, 0 replies; 32+ messages in thread From: Markus Heiser @ 2019-10-29 5:42 UTC (permalink / raw) To: Changbin Du, Jani Nikula Cc: linux-usb, Matthew Wilcox, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, Jonathan Corbet, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx Am 29.10.19 um 01:31 schrieb Changbin Du: >> 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 Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-29 5:42 ` Markus Heiser 0 siblings, 0 replies; 32+ messages in thread From: Markus Heiser @ 2019-10-29 5:42 UTC (permalink / raw) To: Changbin Du, Jani Nikula Cc: linux-usb, Matthew Wilcox, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, Jonathan Corbet, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx Am 29.10.19 um 01:31 schrieb Changbin Du: >> 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 -- _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-29 5:42 ` Markus Heiser 0 siblings, 0 replies; 32+ messages in thread From: Markus Heiser @ 2019-10-29 5:42 UTC (permalink / raw) To: Changbin Du, Jani Nikula Cc: linux-usb, Matthew Wilcox, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, Jonathan Corbet, linux-wireless, linux-kernel, dri-devel, linux-mm, linux-crypto, linux-kselftest, intel-gfx Am 29.10.19 um 01:31 schrieb Changbin Du: >> 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 Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-29 8:00 ` Jonathan Corbet 0 siblings, 0 replies; 32+ messages in thread From: Jonathan Corbet @ 2019-10-29 8:00 UTC (permalink / raw) To: Changbin Du Cc: Jani Nikula, linux-pci, linux-doc, linux-kernel, linux-mm, linux-crypto, linux-kselftest, linux-wireless, linux-fpga, linux-usb, dri-devel, intel-gfx, Matthew Wilcox, Thomas Zimmermann On Tue, 29 Oct 2019 08:31:22 +0800 Changbin Du <changbin.du@gmail.com> 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. Thanks, jon ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-29 8:00 ` Jonathan Corbet 0 siblings, 0 replies; 32+ messages in thread From: Jonathan Corbet @ 2019-10-29 8:00 UTC (permalink / raw) To: Changbin Du Cc: Matthew Wilcox, dri-devel, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, linux-usb, linux-wireless, linux-kernel, linux-mm, linux-crypto, linux-kselftest, intel-gfx On Tue, 29 Oct 2019 08:31:22 +0800 Changbin Du <changbin.du@gmail.com> 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. Thanks, jon _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-29 8:00 ` Jonathan Corbet 0 siblings, 0 replies; 32+ messages in thread From: Jonathan Corbet @ 2019-10-29 8:00 UTC (permalink / raw) To: Changbin Du Cc: Matthew Wilcox, dri-devel, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, linux-usb, linux-wireless, linux-kernel, linux-mm, linux-crypto, linux-kselftest, intel-gfx On Tue, 29 Oct 2019 08:31:22 +0800 Changbin Du <changbin.du@gmail.com> 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. Thanks, jon _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-29 8:00 ` Jonathan Corbet 0 siblings, 0 replies; 32+ messages in thread From: Jonathan Corbet @ 2019-10-29 8:00 UTC (permalink / raw) To: Changbin Du Cc: Jani Nikula, linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg, linux-crypto-u79uwXL29TY76Z2rM5mHXA, linux-kselftest-u79uwXL29TY76Z2rM5mHXA, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-fpga-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Matthew Wilcox, Thomas Zimmermann On Tue, 29 Oct 2019 08:31:22 +0800 Changbin Du <changbin.du-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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. Thanks, jon ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-31 13:50 ` Changbin Du 0 siblings, 0 replies; 32+ messages in thread From: Changbin Du @ 2019-10-31 13:50 UTC (permalink / raw) To: Jonathan Corbet Cc: Changbin Du, Jani Nikula, linux-pci, linux-doc, linux-kernel, linux-mm, linux-crypto, linux-kselftest, linux-wireless, linux-fpga, linux-usb, dri-devel, intel-gfx, Matthew Wilcox, Thomas Zimmermann On Tue, Oct 29, 2019 at 02:00:27AM -0600, Jonathan Corbet wrote: > On Tue, 29 Oct 2019 08:31:22 +0800 > Changbin Du <changbin.du@gmail.com> 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. > Thanks, > > jon -- Cheers, Changbin Du ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Intel-gfx] [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-31 13:50 ` Changbin Du 0 siblings, 0 replies; 32+ messages in thread From: Changbin Du @ 2019-10-31 13:50 UTC (permalink / raw) To: Jonathan Corbet Cc: Matthew Wilcox, dri-devel, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, linux-usb, linux-wireless, linux-kernel, linux-mm, linux-crypto, linux-kselftest, intel-gfx, Changbin Du On Tue, Oct 29, 2019 at 02:00:27AM -0600, Jonathan Corbet wrote: > On Tue, 29 Oct 2019 08:31:22 +0800 > Changbin Du <changbin.du@gmail.com> 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. > Thanks, > > jon -- Cheers, Changbin Du _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' @ 2019-10-31 13:50 ` Changbin Du 0 siblings, 0 replies; 32+ messages in thread From: Changbin Du @ 2019-10-31 13:50 UTC (permalink / raw) To: Jonathan Corbet Cc: Matthew Wilcox, dri-devel, Thomas Zimmermann, linux-doc, linux-pci, linux-fpga, linux-usb, linux-wireless, linux-kernel, linux-mm, linux-crypto, linux-kselftest, intel-gfx, Changbin Du On Tue, Oct 29, 2019 at 02:00:27AM -0600, Jonathan Corbet wrote: > On Tue, 29 Oct 2019 08:31:22 +0800 > Changbin Du <changbin.du@gmail.com> 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. > Thanks, > > jon -- Cheers, Changbin Du _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2019-11-01 8:10 UTC | newest] Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-10-20 13:17 [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' Changbin Du 2019-10-20 18:05 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork 2019-10-20 18:35 ` ✓ Fi.CI.BAT: success " Patchwork 2019-10-20 20:14 ` ✗ Fi.CI.IGT: failure " Patchwork 2019-10-24 18:19 ` [PATCH v2] " Jonathan Corbet 2019-10-24 18:19 ` [Intel-gfx] " Jonathan Corbet 2019-10-24 18:19 ` Jonathan Corbet 2019-10-25 6:57 ` Jani Nikula 2019-10-25 6:57 ` [Intel-gfx] " Jani Nikula 2019-10-25 6:57 ` Jani Nikula 2019-10-25 14:48 ` Changbin Du 2019-10-25 14:48 ` [Intel-gfx] " Changbin Du 2019-10-25 14:48 ` Changbin Du 2019-10-28 9:24 ` Jani Nikula 2019-10-28 9:24 ` [Intel-gfx] " Jani Nikula 2019-10-28 9:24 ` Jani Nikula 2019-10-28 9:24 ` Jani Nikula 2019-10-28 9:24 ` Jani Nikula 2019-10-29 0:31 ` Changbin Du 2019-10-29 0:31 ` [Intel-gfx] " Changbin Du 2019-10-29 0:31 ` Changbin Du 2019-10-29 5:42 ` Markus Heiser 2019-10-29 5:42 ` [Intel-gfx] " Markus Heiser 2019-10-29 5:42 ` Markus Heiser 2019-10-29 5:42 ` Markus Heiser 2019-10-29 8:00 ` Jonathan Corbet 2019-10-29 8:00 ` [Intel-gfx] " Jonathan Corbet 2019-10-29 8:00 ` Jonathan Corbet 2019-10-29 8:00 ` Jonathan Corbet 2019-10-31 13:50 ` Changbin Du 2019-10-31 13:50 ` [Intel-gfx] " Changbin Du 2019-10-31 13:50 ` Changbin Du
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.