aboutsummaryrefslogtreecommitdiff
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-11-17 17:52:57 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-12-10 12:15:22 -0500
commita832c9844de991f75fa5af3247ddd7205ef823d9 (patch)
tree8d58c395881dd53be16f916497919ead8f77cc56 /scripts/kernel-doc
parent306b015cfb9394199d062a0d2ff7534d37d54510 (diff)
downloadqemu-a832c9844de991f75fa5af3247ddd7205ef823d9.zip
qemu-a832c9844de991f75fa5af3247ddd7205ef823d9.tar.gz
qemu-a832c9844de991f75fa5af3247ddd7205ef823d9.tar.bz2
Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments"
This reverts commit 92bb29f9b2c3d4a98eef5f0db935d4be291eec72. We will replace the commit with the fix from Linux. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201117165312.118257-15-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc18
1 files changed, 1 insertions, 17 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 073f72c..cb60353 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -860,23 +860,7 @@ sub output_function_rst(%) {
output_highlight_rst($args{'purpose'});
$start = "\n\n**Syntax**\n\n ``";
} else {
- if ((split(/\./, $sphinx_version))[0] >= 3) {
- # Sphinx 3 and later distinguish macros and functions and
- # complain if you use c:function with something that's not
- # syntactically valid as a function declaration.
- # We assume that anything with a return type is a function
- # and anything without is a macro.
- if ($args{'functiontype'} ne "") {
- print ".. c:function:: ";
- } else {
- print ".. c:macro:: ";
- }
- } else {
- # Older Sphinx don't support documenting macros that take
- # arguments with c:macro, and don't complain about the use
- # of c:function for this.
- print ".. c:function:: ";
- }
+ print ".. c:function:: ";
}
if ($args{'functiontype'} ne "") {
$start .= $args{'functiontype'} . " " . $args{'function'} . " (";