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

docs: Note that :c:func: should no longer be used

Now that we can mark up function() automatically, there is no reason to use
:c:func: and every reason to avoid it. Adjust the documentation to reflect
that fact.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>

+7 -4
+7 -4
Documentation/doc-guide/sphinx.rst
··· 241 241 242 242 The func-name (e.g. ioctl) remains in the output but the ref-name changed from 243 243 ``ioctl`` to ``VIDIOC_LOG_STATUS``. The index entry for this function is also 244 - changed to ``VIDIOC_LOG_STATUS`` and the function can now referenced by: 244 + changed to ``VIDIOC_LOG_STATUS``. 245 245 246 - .. code-block:: rst 247 - 248 - :c:func:`VIDIOC_LOG_STATUS` 246 + Please note that there is no need to use ``c:func:`` to generate cross 247 + references to function documentation. Due to some Sphinx extension magic, 248 + the documentation build system will automatically turn a reference to 249 + ``function()`` into a cross reference if an index entry for the given 250 + function name exists. If you see ``c:func:`` use in a kernel document, 251 + please feel free to remove it. 249 252 250 253 251 254 list tables