[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/29] Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for ma
From: |
Paolo Bonzini |
Subject: |
[PATCH 14/29] Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments" |
Date: |
Tue, 17 Nov 2020 17:52:57 +0100 |
This reverts commit 92bb29f9b2c3d4a98eef5f0db935d4be291eec72.
We will replace the commit with the fix from Linux.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
scripts/kernel-doc | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 073f72c7da..cb603532ed 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'} . " (";
--
2.28.0
- [PATCH 04/29] scripts: kernel-doc: proper handle @foo->bar(), (continued)
- [PATCH 04/29] scripts: kernel-doc: proper handle @foo->bar(), Paolo Bonzini, 2020/11/17
- [PATCH 06/29] scripts: kernel-doc: accept blank lines on parameter description, Paolo Bonzini, 2020/11/17
- [PATCH 05/29] scripts: kernel-doc: accept negation like !@var, Paolo Bonzini, 2020/11/17
- [PATCH 07/29] Replace HTTP links with HTTPS ones: documentation, Paolo Bonzini, 2020/11/17
- [PATCH 08/29] scripts/kernel-doc: parse __ETHTOOL_DECLARE_LINK_MODE_MASK, Paolo Bonzini, 2020/11/17
- [PATCH 09/29] scripts/kernel-doc: handle function pointer prototypes, Paolo Bonzini, 2020/11/17
- [PATCH 10/29] scripts/kernel-doc: optionally treat warnings as errors, Paolo Bonzini, 2020/11/17
- [PATCH 12/29] kernel-doc: add support for ____cacheline_aligned attribute, Paolo Bonzini, 2020/11/17
- [PATCH 11/29] kernel-doc: include line numbers for function prototypes, Paolo Bonzini, 2020/11/17
- [PATCH 13/29] scripts: kernel-doc: add support for typedef enum, Paolo Bonzini, 2020/11/17
- [PATCH 14/29] Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments",
Paolo Bonzini <=
- [PATCH 15/29] Revert "kernel-doc: Use c:struct for Sphinx 3.0 and later", Paolo Bonzini, 2020/11/17
- [PATCH 16/29] scripts: kernel-doc: make it more compatible with Sphinx 3.x, Paolo Bonzini, 2020/11/17
- [PATCH 18/29] scripts: kernel-doc: fix troubles with line counts, Paolo Bonzini, 2020/11/17
- [PATCH 17/29] scripts: kernel-doc: use a less pedantic markup for funcs on Sphinx 3.x, Paolo Bonzini, 2020/11/17
- [PATCH 19/29] scripts: kernel-doc: reimplement -nofunction argument, Paolo Bonzini, 2020/11/17
- [PATCH 20/29] scripts: kernel-doc: fix typedef identification, Paolo Bonzini, 2020/11/17
- [PATCH 25/29] Revert "kernel-doc: Handle function typedefs without asterisks", Paolo Bonzini, 2020/11/17
- [PATCH 21/29] scripts: kernel-doc: don't mangle with parameter list, Paolo Bonzini, 2020/11/17
- [PATCH 22/29] scripts: kernel-doc: allow passing desired Sphinx C domain dialect, Paolo Bonzini, 2020/11/17
- [PATCH 23/29] scripts: kernel-doc: fix line number handling, Paolo Bonzini, 2020/11/17