diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-02-10 13:18:11 +0300 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2025-02-10 21:19:57 +0300 |
commit | c940816968da6ef9a9462b7c070cc333d609a16c (patch) | |
tree | 8591444b330470d78010898ef33546fe05669ecf /scripts/lib/abi/abi_parser.py | |
parent | 4bb2dbd7576d38a5789692f2b87003fa99138090 (diff) | |
download | linux-c940816968da6ef9a9462b7c070cc333d609a16c.tar.xz |
docs: sphinx/automarkup: add cross-references for ABI
Now that all ABI files are handled together, we can add a feature
at automarkup for it to generate cross-references for ABI symbols.
The cross-reference logic can produce references for all existing
files, except for README (as this is not parsed).
For symbols, they need to be an exact match of what it is
described at the docs, which is not always true due to wildcards.
If symbols at /sys /proc and /config are identical, a cross-reference
will be used.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/0b97a51b68b1c20127ad4a6a55658557fe0848d0.1739182025.git.mchehab+huawei@kernel.org
Diffstat (limited to 'scripts/lib/abi/abi_parser.py')
-rw-r--r-- | scripts/lib/abi/abi_parser.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/lib/abi/abi_parser.py b/scripts/lib/abi/abi_parser.py index 87d1b9e14bb3..3b1ab4c0bdd7 100644 --- a/scripts/lib/abi/abi_parser.py +++ b/scripts/lib/abi/abi_parser.py @@ -391,6 +391,17 @@ class AbiParser: return desc + "\n\n" + def xref(self, fname): + """ + Converts a Documentation/ABI + basename into a ReST cross-reference + """ + + xref = self.file_refs.get(fname) + if not xref: + return None + else: + return xref + def desc_rst(self, desc): """Enrich ReST output by creating cross-references""" |