aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/lib/kdoc/kdoc_files.py (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2025-04-14Documentation/rtla: Fix typo in common_timerlat_description.rstTomas Glozar1-1/+1
Fix "it enable" to "it enables". Fixes: 29380d4055e5 ("rtla: Add rtla timerlat documentation") Signed-off-by: Tomas Glozar <tglozar@redhat.com> Reviewed-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250311114936.148012-4-tglozar@redhat.com
2025-04-14Documentation/rtla: Fix typo in rtla-timerlat.rstTomas Glozar1-3/+3
The file says "rtla hist hist mode" instead of "rtla timerlat hist mode". Fix the typo. Fixes: 29380d4055e5 ("rtla: Add rtla timerlat documentation") Signed-off-by: Tomas Glozar <tglozar@redhat.com> Reviewed-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250311114936.148012-3-tglozar@redhat.com
2025-04-14Documentation/rtla: Fix duplicate text about timerlat tracerTomas Glozar1-3/+0
A passage about how the timerlat tracer outputs information is included in both common_timerlat_description.rst and rtla-timerlat.rst, leading it to be displayed twice in the rtla-timerlat page. Remove the duplicate passage from rtla-timerlat.rst. Fixes: 29380d4055e5 ("rtla: Add rtla timerlat documentation") Signed-off-by: Tomas Glozar <tglozar@redhat.com> Reviewed-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250311114936.148012-2-tglozar@redhat.com
2025-04-14docs: hid: Fix typo in intel-thc-hid.rstChih Yun Lin1-4/+4
Corrected the spelling of "triggerred" to "triggered" and "flexiblity" to "flexibility". Signed-off-by: Chih Yun Lin <noralin249@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250330084518.20916-1-noralin249@gmail.com
2025-04-14Added usb_string function to a namespaceKevin Paul Reddy Janagari1-0/+1
with reference to WARNING: Duplicate C declaration, also defined at driver-api/usb/gadget:804 There is a function usb_string in the file message.c, there is also a struct usb_string in the kernel api headers. The docs is unable to index the function as the index is occupied by struct This fix adds messgae.c to the usb_core namespace (in docs) hence providing usb_sting a unique index usb_core.usb_string() Signed-off-by: Kevin Paul Reddy Janagari <kevinpaul468@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250405165116.147958-1-kevinpaul468@gmail.com
2025-04-14cpufreq: editing corrections to cpufreq.rstRandy Dunlap1-4/+4
Change a few words and abbreviations/punctuation. Change one echo command to include a trailing '`'. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Rafael J. Wysocki <rafael@kernel.org> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: linux-pm@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250405001447.4039463-1-rdunlap@infradead.org
2025-04-14docs: Disambiguate a pair of rST labelsJames Addison2-4/+4
According to the reStructuredText documentation, internal hyperlink targets[1] are intended to resolve within the current document. Sphinx has a bug that causes internal hyperlinks declared with duplicate names to resolve nondeterministically, producing incorrect documentation. Sphinx does not yet emit a warning when these duplicate target names are declared. To improve the reproducibility and correctness of the HTML documentation, disambiguate two labels both previously titled "submit_improvements". [1] - https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#hyperlink-targets Link: https://github.com/sphinx-doc/sphinx/issues/13383 Signed-off-by: James Addison <jay@jp-hosting.net> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250407195120.331103-2-jvanderwaa@redhat.com
2025-04-14docs: automarkup: Move common logic to add and resolve xref to helperNĂ­colas F. R. A. Prado1-73/+24
Several of the markup functions contain the same code, calling into sphinx's pending_xref and resolve_xref functions to add and resolve a cross-reference, with only a few of the parameters changed (domain, reference type, markup content). Move this logic to its own function and reuse it in the markup functions. No functional change. Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250408-automarkup-resolve-xref-helper-v2-1-e0a9b8fc7fdd@collabora.com
2025-04-09scripts: kernel-doc: fix parsing function-like typedefs (again)Sean Anderson2-2/+2
Typedefs like typedef struct phylink_pcs *(*pcs_xlate_t)(const u64 *args); have a typedef_type that ends with a * and therefore has no word boundary. Add an extra clause for the final group of the typedef_type so we only require a word boundary if we match a word. [mchehab: modify also kernel-doc.py, as we're deprecating the perl version] Fixes: 7d2c6b1edf79 ("scripts: kernel-doc: fix parsing function-like typedefs") Signed-off-by: Sean Anderson <sean.anderson@linux.dev> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/e0abb103c73a96d76602d909f60ab8fd6e2fd0bd.1744106242.git.mchehab+huawei@kernel.org
2025-04-09scripts/kernel-doc.py: Rename the kernel doc Re class to KernReMauro Carvalho Chehab3-159/+159
Using just "Re" makes it harder to distinguish from the native "re" class. So, let's rename it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/4e095ecd5235a3e811ddcf5bad4cfb92f1da0a4a.1744106242.git.mchehab+huawei@kernel.org
2025-04-09scripts/kernel_doc.py: better handle exported symbolsMauro Carvalho Chehab4-79/+124
Change the logic which detects internal/external symbols in a way that we can re-use it when calling via Sphinx extension. While here, remove an unused self.config var and let it clearer that self.config variables are read-only. This helps to allow handling multiple times in parallel if ever needed. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/6a69ba8d2b7ee6a6427abb53e60d09bd4d3565ee.1744106242.git.mchehab+huawei@kernel.org
2025-04-09scripts/lib/kdoc/kdoc_files.py: allow filtering output per fnameMauro Carvalho Chehab1-12/+12
For kerneldoc Sphinx extension, it is useful to display parsed results only from a single file. Change the logic at KernelFiles.msg() to allow such usage. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/9f5c0ff2568f34532ca99465fb378241d831d39f.1744106242.git.mchehab+huawei@kernel.org
2025-04-09scripts/kernel-doc: switch to use kernel-doc.pyMauro Carvalho Chehab1-1/+1
Now that all features are in place, change the kernel-doc alias to point to kernel-doc.py. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/d84a2ad282821928a60b8dcbec305ef7e7bd58e6.1744106242.git.mchehab+huawei@kernel.org
2025-04-09scripts/kernel-doc.py: Properly handle Werror and exit codesMauro Carvalho Chehab4-18/+35
The original kernel-doc script has a logic to return warnings as errors, and to report the number of warnings found, if in verbose mode. Implement it to be fully compatible with the original script. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/de33b0cebd9fdf82d8b221bcfe41db7269286222.1744106242.git.mchehab+huawei@kernel.org
2025-04-09scripts/lib/kdoc/kdoc_parser.py: remove a python 3.9 dependencyMauro Carvalho Chehab1-1/+1
str.removesuffix() was added on Python 3.9, but rstrip() actually does the same thing, as we just want to remove a single character. It is also shorter. So, use it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/f64cc4adef107ada26da4bfb7e4b7002dd783173.1744106242.git.mchehab+huawei@kernel.org
2025-04-09scripts/kernel-doc.py: properly handle KBUILD_BUILD_TIMESTAMPMauro Carvalho Chehab2-16/+21
The logic that handles KBUILD_BUILD_TIMESTAMP is wrong, and adds a dependency of a third party module (dateutil). Fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/ffc70a1b741b010365ed82f31611018f24f91ce7.1744106242.git.mchehab+huawei@kernel.org
2025-04-09scripts/kernel-doc.py: move modulename to man classMauro Carvalho Chehab4-22/+11
Only man output requires a modulename. Move its definition to the man class. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/583085e3885b0075d16ef9961b4f2ad870f30a55.1744106242.git.mchehab+huawei@kernel.org
2025-04-09scripts/lib/kdoc/kdoc_parser.py: fix Python compat with < v3.13Mauro Carvalho Chehab2-6/+6
- str.replace count was introduced only in Python 3.13; - before Python 3.13, f-string dict arguments can't use the same delimiter of the main string. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/e2b8e8361294558dae09236e4b8fbea5d86be5a3.1744106242.git.mchehab+huawei@kernel.org
2025-04-09scripts/kernel-doc.py: adjust some coding style issuesMauro Carvalho Chehab5-42/+57
Make pylint happier by adding some missing documentation and addressing a couple of pylint warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/0f9d5473105e4c09c6c41e3db72cc63f1d4d55f9.1744106242.git.mchehab+huawei@kernel.org
2025-04-09scripts/kernel-doc.py: Set an output format for --noneMauro Carvalho Chehab1-0/+4
Now that warnings output is deferred to the output plugin, we need to have an output style for none as well. So, use the OutputFormat base class on such cases. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/caa1089e16f4609f792ff26731ad9e9c3a6f6b1d.1744106242.git.mchehab+huawei@kernel.org
2025-04-09docs: sphinx: kerneldoc: use kernel-doc.py scriptMauro Carvalho Chehab2-2/+2
Switch to the new version when producing documentation. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/a81d8db099d9cef5161deaef40ac9056bf9802a3.1744106242.git.mchehab+huawei@kernel.org
2025-04-09docs: sphinx: kerneldoc: ignore "\" characters from optionsMauro Carvalho Chehab1-0/+12
Documentation/driver-api/infiniband.rst has a kernel-doc tag with "\" characters at the end: .. kernel-doc:: drivers/infiniband/ulp/iser/iscsi_iser.c :functions: iscsi_iser_pdu_alloc iser_initialize_task_headers \ iscsi_iser_task_init iscsi_iser_mtask_xmit iscsi_iser_task_xmit \ iscsi_iser_cleanup_task iscsi_iser_check_protection \ iscsi_iser_conn_create iscsi_iser_conn_bind \ iscsi_iser_conn_start iscsi_iser_conn_stop \ iscsi_iser_session_destroy iscsi_iser_session_create \ iscsi_iser_set_param iscsi_iser_ep_connect iscsi_iser_ep_poll \ iscsi_iser_ep_disconnect This is not handled well, as the "\" strings will be just stored inside Sphinx options. While the actual problem deserves being fixed, better to relax the keneldoc.py extension to silently strip "\" from the end of strings, as otherwise this may cause troubles when preparing arguments to be executed by kernel-doc. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/4c652d6c57b20500c135b95294e554d9e9a97f42.1744106242.git.mchehab+huawei@kernel.org
2025-04-09docs: sphinx: kerneldoc: verbose kernel-doc command if V=1Mauro Carvalho Chehab1-0/+34
It is useful to know what kernel-doc command was used during document build time, as it allows one to check the output the same way as Sphinx extension does. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/a2f01590814b111e138f278e8a721024fdf2d445.1744106242.git.mchehab+huawei@kernel.org