Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: sphinx: kerneldoc: ignore "\" characters from options

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

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
01c43355 668b9d1d

+12
+12
Documentation/sphinx/kerneldoc.py
··· 118 118 identifiers = self.options.get('identifiers').split() 119 119 if identifiers: 120 120 for i in identifiers: 121 + i = i.rstrip("\\").strip() 122 + if not i: 123 + continue 124 + 121 125 cmd += ['-function', i] 122 126 else: 123 127 cmd += ['-no-doc-sections'] ··· 130 126 no_identifiers = self.options.get('no-identifiers').split() 131 127 if no_identifiers: 132 128 for i in no_identifiers: 129 + i = i.rstrip("\\").strip() 130 + if not i: 131 + continue 132 + 133 133 cmd += ['-nosymbol', i] 134 134 135 135 for pattern in export_file_patterns: 136 + pattern = pattern.rstrip("\\").strip() 137 + if not pattern: 138 + continue 139 + 136 140 for f in glob.glob(env.config.kerneldoc_srctree + '/' + pattern): 137 141 env.note_dependency(os.path.abspath(f)) 138 142 cmd += ['-export-file', f]