summary refs log tree commit diff stats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2025-08-14 18:13:22 +0100
committerPeter Maydell <peter.maydell@linaro.org>2025-08-30 16:37:23 +0100
commit619d5f0211ac69d71291505a8528671ab83764e3 (patch)
treee71406794f7c3a3a7df22b929cb1500757384b34 /linux-user/syscall.c
parent33be8171e2fe02173d24ffd61bd97bf9c2b37834 (diff)
downloadfocaccia-qemu-619d5f0211ac69d71291505a8528671ab83764e3.tar.gz
focaccia-qemu-619d5f0211ac69d71291505a8528671ab83764e3.zip
scripts/kernel-doc: Delete the old Perl kernel-doc script
We can now delete the old Perl kernel-doc script. For posterity,
this is a complete diff of the local changes that we were carrying
between the kernel's Perl script as of kernel commit 72b97d0b911872ba
(the last time we synced it) and our local copy:

--- /tmp/kdoc   2025-08-14 10:42:47.620331939 +0100
+++ scripts/kernel-doc  2025-02-17 10:44:34.528421457 +0000
@@ -1,5 +1,5 @@
 #!/usr/bin/env perl
-# SPDX-License-Identifier: GPL-2.0
+# SPDX-License-Identifier: GPL-2.0-only

 use warnings;
 use strict;
@@ -224,12 +224,12 @@
 my $type_fp_param = '\@(\w+)\(\)';  # Special RST handling for func ptr params
 my $type_fp_param2 = '\@(\w+->\S+)\(\)';  # Special RST handling for structs with func ptr params
 my $type_env = '(\$\w+)';
-my $type_enum = '\&(enum\s*([_\w]+))';
-my $type_struct = '\&(struct\s*([_\w]+))';
-my $type_typedef = '\&(typedef\s*([_\w]+))';
-my $type_union = '\&(union\s*([_\w]+))';
-my $type_member = '\&([_\w]+)(\.|->)([_\w]+)';
-my $type_fallback = '\&([_\w]+)';
+my $type_enum = '#(enum\s*([_\w]+))';
+my $type_struct = '#(struct\s*([_\w]+))';
+my $type_typedef = '#(([A-Z][_\w]*))';
+my $type_union = '#(union\s*([_\w]+))';
+my $type_member = '#([_\w]+)(\.|->)([_\w]+)';
+my $type_fallback = '(?!)';    # this never matches
 my $type_member_func = $type_member . '\(\)';

 # Output conversion substitutions.
@@ -1745,6 +1745,9 @@
             )+
           \)\)\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
@@ -2057,7 +2060,7 @@
     }
     elsif (/$doc_decl/o) {
        $identifier = $1;
-       if (/\s*([\w\s]+?)(\(\))?\s*-/) {
+       if (/\s*([\w\s]+?)(\s*-|:)/) {
            $identifier = $1;
        }

@@ -2067,7 +2070,7 @@
        $contents = "";
        $section = $section_default;
        $new_start_line = $. + 1;
-       if (/-(.*)/) {
+       if (/[-:](.*)/) {
            # strip leading/trailing/multiple spaces
            $descr= $1;
            $descr =~ s/^\s*//;

These changes correspond to:
06e2329636f license: Update deprecated SPDX tag GPL-2.0 to GPL-2.0-only
(a bulk change which we won't bother to re-apply to this third-party script)
b30df2751e5 scripts/kernel-doc: strip QEMU_ from function definitions
4cf41794411 docs: tweak kernel-doc for QEMU coding standards

We have already applied the equivalent of these changes to the
Python code in libs/kdoc/ in the preceding commits.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'linux-user/syscall.c')
0 files changed, 0 insertions, 0 deletions