diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-02-10 11:18:05 +0100 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2025-02-10 11:19:57 -0700 |
commit | aea5e52dce74f679b91c66caad91d587d5504f6c (patch) | |
tree | 26ab5725dedcb13394f365cce097aab754e0e84e /scripts/get_abi.py | |
parent | ee34f8300c8940758dc69f80107d9f5873c08f17 (diff) | |
download | linux-stable-aea5e52dce74f679b91c66caad91d587d5504f6c.tar.gz linux-stable-aea5e52dce74f679b91c66caad91d587d5504f6c.tar.bz2 linux-stable-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 <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/15be22955e3c6df49d7256c8fd24f62b397ad0ff.1739182025.git.mchehab+huawei@kernel.org
Diffstat (limited to 'scripts/get_abi.py')
-rwxr-xr-x | scripts/get_abi.py | 7 |
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""" |