mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
scripts/kernel-doc: strip QEMU_ from function definitions
Some packaged versions of Sphinx (fedora33/alpine so far) have issues with the annotated C code that kernel-doc spits out. Without knowing about things like QEMU_PLUGIN_EXPORT it chokes trying to understand the code. Evidently this is a problem for the kernel as well as the long stream of regex substitutions we add to in this patch can attest. Fortunately we have a fairly common format for all our compiler shenanigans as applied to functions so lets just filter them all out. Signed-off-by: Alex Bennée <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
This commit is contained in:
1 parent
01874b15d3
commit
b30df2751e
1 file changed
+3
@@ -1745,6 +1745,9 @@ sub dump_function($$) {
|
||||
)+
|
||||
\)\)\s+//x;
|
||||
|
||||
# Strip QEMU specific compiler annotations
|
||||
$prototype =~ s/QEMU_[A-Z_]+ +//;
|
||||
|
||||
# Yes, this truly is vile. We are looking for:
|
||||
# 1. Return type (may be nothing if we're looking at a macro)
|
||||
# 2. Function name
|
||||
|
||||
Reference in new issue
Block a user