[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 15/32] Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for
From: |
Paolo Bonzini |
Subject: |
[PATCH v2 15/32] Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments" |
Date: |
Tue, 1 Dec 2020 05:34:45 -0500 |
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>
---
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.26.2
- [PATCH v2 01/32] docs: temporarily disable the kernel-doc extension, (continued)
- [PATCH v2 01/32] docs: temporarily disable the kernel-doc extension, Paolo Bonzini, 2020/12/01
- [PATCH v2 03/32] kernel-doc: add support for ____cacheline_aligned_in_smp attribute, Paolo Bonzini, 2020/12/01
- [PATCH v2 05/32] scripts: kernel-doc: proper handle @foo->bar(), Paolo Bonzini, 2020/12/01
- [PATCH v2 06/32] scripts: kernel-doc: accept negation like !@var, Paolo Bonzini, 2020/12/01
- [PATCH v2 04/32] scripts/kernel-doc: Add support for named variable macro arguments, Paolo Bonzini, 2020/12/01
- [PATCH v2 09/32] scripts/kernel-doc: parse __ETHTOOL_DECLARE_LINK_MODE_MASK, Paolo Bonzini, 2020/12/01
- [PATCH v2 08/32] Replace HTTP links with HTTPS ones: documentation, Paolo Bonzini, 2020/12/01
- [PATCH v2 14/32] scripts: kernel-doc: add support for typedef enum, Paolo Bonzini, 2020/12/01
- [PATCH v2 07/32] scripts: kernel-doc: accept blank lines on parameter description, Paolo Bonzini, 2020/12/01
- [PATCH v2 15/32] Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments",
Paolo Bonzini <=
- [PATCH v2 10/32] scripts/kernel-doc: handle function pointer prototypes, Paolo Bonzini, 2020/12/01
- [PATCH v2 11/32] scripts/kernel-doc: optionally treat warnings as errors, Paolo Bonzini, 2020/12/01
- [PATCH v2 02/32] kernel-doc: fix processing nested structs with attributes, Paolo Bonzini, 2020/12/01
- [PATCH v2 16/32] Revert "kernel-doc: Use c:struct for Sphinx 3.0 and later", Paolo Bonzini, 2020/12/01
- [PATCH v2 26/32] Revert "kernel-doc: Handle function typedefs without asterisks", Paolo Bonzini, 2020/12/01
- [PATCH v2 19/32] scripts: kernel-doc: fix troubles with line counts, Paolo Bonzini, 2020/12/01
- [PATCH v2 20/32] scripts: kernel-doc: reimplement -nofunction argument, Paolo Bonzini, 2020/12/01
- [PATCH v2 25/32] scripts: kernel-doc: try to use c:function if possible, Paolo Bonzini, 2020/12/01
- [PATCH v2 12/32] kernel-doc: include line numbers for function prototypes, Paolo Bonzini, 2020/12/01
- [PATCH v2 29/32] scripts: kernel-doc: split typedef complex regex, Paolo Bonzini, 2020/12/01