aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/get_abi.py
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <[email protected]>2025-02-10 10:18:05 +0000
committerJonathan Corbet <[email protected]>2025-02-10 18:19:57 +0000
commitaea5e52dce74f679b91c66caad91d587d5504f6c (patch)
tree26ab5725dedcb13394f365cce097aab754e0e84e /scripts/get_abi.py
parentdocs: sphinx/kernel_abi: use AbiParser directly (diff)
downloadkernel-aea5e52dce74f679b91c66caad91d587d5504f6c.tar.gz
kernel-aea5e52dce74f679b91c66caad91d587d5504f6c.zip
docs: sphinx/kernel_abi: reduce buffer usage for ABI messages
Instead of producing a big message with all ABI contents and then parse as a whole, simplify the code by handling each ABI symbol in separate. As an additional benefit, there's no need to place file/line nubers inlined at the data and use a regex to convert them. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/15be22955e3c6df49d7256c8fd24f62b397ad0ff.1739182025.git.mchehab+huawei@kernel.org
Diffstat (limited to 'scripts/get_abi.py')
-rwxr-xr-xscripts/get_abi.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/get_abi.py b/scripts/get_abi.py
index 93b973bc07ed..19f78d6aa407 100755
--- a/scripts/get_abi.py
+++ b/scripts/get_abi.py
@@ -63,8 +63,11 @@ class AbiRest:
parser.parse_abi()
parser.check_issues()
- for msg in parser.doc(args.enable_lineno, args.raw, not args.no_file):
- print(msg)
+ for t in parser.doc(args.raw, not args.no_file):
+ if args.enable_lineno:
+ print (f".. LINENO {t[1]}#{t[2]}\n\n")
+
+ print(t[0])
class AbiValidate:
"""Initialize an argparse subparser for ABI validation"""