From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>, "Matthew Wilcox" <willy@infradead.org>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] script: add a script for checking doc problems with external functions
Date: Tue, 6 Oct 2020 14:13:46 +0200 [thread overview]
Message-ID: <20201006141346.68074cff@coco.lan> (raw)
In-Reply-To: <e40a32900dba6b8e7a1f41838ee8caeb1ef1c1b3.1601985151.git.mchehab+huawei@kernel.org>
Hi Matthew/Jon,
Em Tue, 6 Oct 2020 13:53:34 +0200
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> escreveu:
> While not all EXPORT_SYMBOL*() symbols should be documented,
> it seems useful to have a tool which would help to check what
> symbols aren't documented.
>
> This is a first step on this direction. The tool has some
> limitations. Yet, it could be useful for maintainers to check
> about missing documents on their subsystems.
>
> Suggested-by: Matthew Wilcox <willy@infradead.org>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
As suggested, I improved the script for it to provide some hints
about what documentation is missing:
$ ./scripts/check_docs_external_symbols drivers/media/v4l2-core/
warning: drivers/media/v4l2-core/videobuf-dma-contig.c: missing documentation for videobuf_queue_dma_contig_init videobuf_to_dma_contig videobuf_dma_contig_free
warning: drivers/media/v4l2-core/v4l2-clk.c: missing documentation for v4l2_clk_get v4l2_clk_put v4l2_clk_enable v4l2_clk_disable v4l2_clk_get_rate v4l2_clk_set_rate v4l2_clk_register v4l2_clk_unregister __v4l2_clk_register_fixed v4l2_clk_unregister_fixed
warning: include/media/v4l2-h264.h: file not included at Documentation/
warning: drivers/media/v4l2-core/v4l2-h264.c: file not included at Documentation/
warning: drivers/media/v4l2-core/videobuf-core.c: missing documentation for videobuf_alloc_vb videobuf_waiton videobuf_iolock videobuf_queue_to_vaddr videobuf_queue_core_init videobuf_queue_is_busy videobuf_queue_cancel videobuf_next_field videobuf_mmap_free __videobuf_mmap_setup videobuf_mmap_setup videobuf_reqbufs videobuf_querybuf videobuf_qbuf videobuf_dqbuf videobuf_streamon videobuf_streamoff videobuf_read_one videobuf_read_start videobuf_read_stop videobuf_stop videobuf_read_stream videobuf_poll_stream videobuf_mmap_mapper
warning: drivers/media/v4l2-core/v4l2-mem2mem.c: file not included at Documentation/
warning: drivers/media/v4l2-core/v4l2-dev.c: missing documentation for video_device_alloc video_device_release video_device_release_empty video_devdata v4l2_prio_init v4l2_prio_change v4l2_prio_open v4l2_prio_close v4l2_prio_max v4l2_prio_check __video_register_device
warning: drivers/media/v4l2-core/v4l2-dev.c: file not included at Documentation/
It also report things that shouldn't be documented, like those:
$ ./scripts/check_docs_external_symbols drivers/media/pci/saa7134
warning: drivers/media/pci/saa7134/saa7134-video.c: missing documentation for saa7134_vb2_buffer_queue saa7134_enum_input saa7134_g_input saa7134_s_input saa7134_querycap saa7134_s_std saa7134_g_std saa7134_querystd saa7134_g_tuner saa7134_s_tuner saa7134_g_frequency saa7134_s_frequency
warning: drivers/media/pci/saa7134/saa7134-core.c: missing documentation for saa7134_stop_streaming saa7134_ts_register saa7134_ts_unregister saa7134_set_gpio saa7134_dmasound_init saa7134_dmasound_exit saa7134_pgtable_free saa7134_pgtable_build saa7134_pgtable_alloc saa7134_set_dmabits
warning: drivers/media/pci/saa7134/saa7134-ts.c: missing documentation for saa7134_ts_buffer_init saa7134_ts_buffer_prepare saa7134_ts_queue_setup saa7134_ts_start_streaming saa7134_ts_stop_streaming
On this specific case, the saa7134 driver was split into multiple
drivers, depending on the PCI sub-interfaces found on some complex
media devices. IMO, it doesn't make any sense to document such
symbols, as they aren't meant to be used outside saa7134 sub-drivers.
-
As noticed on its comments, this script is not perfect. It tries to
avoid reporting false-positives by not processing files that it
can't find all includes and by skipping non-functions.
Yet, it can take a long time for it to parse the entire Kernel
tree. So, at least on its current state, I don't think it would
be a good idea to add it to the default build.
Feel free to either take it as-is, to improve it, or to ignore ;-)
Thanks,
Mauro
next prev parent reply other threads:[~2020-10-06 12:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 10:23 [PATCH 00/14] get rid of the remaining kernel-doc warnings when building the docs Mauro Carvalho Chehab
2020-09-10 10:23 ` [PATCH 01/14] locking/refcount: document the new "oldp" pointer value Mauro Carvalho Chehab
2020-09-10 10:23 ` [PATCH 02/14] usb: docs: document altmode register/unregister functions Mauro Carvalho Chehab
2020-09-10 10:23 ` [PATCH 03/14] XArray: docs: add missing kernel-doc parameters for xas_split_alloc() Mauro Carvalho Chehab
2020-09-10 11:13 ` Matthew Wilcox
2020-09-10 12:38 ` Mauro Carvalho Chehab
2020-09-10 10:23 ` [PATCH 04/14] blk-mq: docs: add kernel-doc description for a new struct member Mauro Carvalho Chehab
2020-09-10 10:23 ` [PATCH 05/14] iio: docs: add description for a new function member Mauro Carvalho Chehab
2020-09-10 10:23 ` [PATCH 06/14] nl80211: docs: add a description for s1g_cap parameter Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 07/14] IB/srpt: docs: add a description for cq_size member Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 08/14] rcu/tree: docs: document bkvcache new members at struct kfree_rcu_cpu Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 09/14] Input: sparse-keymap: add a description for @sw Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 10/14] drm: amdgpu: kernel-doc: update some adev parameters Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 11/14] drm/amd/display: kernel-doc: document force_timing_sync Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 12/14] drm: kernel-doc: document drm_dp_set_subconnector_property() params Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 13/14] drm: kernel-doc: drm_dp_helper.h: fix a typo Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 14/14] gpu: docs: amdgpu.rst: get rid of wrong kernel-doc markups Mauro Carvalho Chehab
2020-09-10 18:12 ` [PATCH 00/14] get rid of the remaining kernel-doc warnings when building the docs Matthew Wilcox
2020-10-05 10:51 ` Mauro Carvalho Chehab
2020-10-05 10:59 ` Mauro Carvalho Chehab
2020-10-06 11:53 ` [PATCH RFC] script: add a script for checking doc problems with external functions Mauro Carvalho Chehab
2020-10-06 12:13 ` Mauro Carvalho Chehab [this message]
2020-10-07 8:23 ` Jani Nikula
2020-10-07 8:32 ` Joe Perches
2020-10-07 13:38 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201006141346.68074cff@coco.lan \
--to=mchehab+huawei@kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).