aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2020-06-26 11:35:10 -0600
committerJonathan Corbet <corbet@lwn.net>2020-06-26 11:35:10 -0600
commit435a77434653faabcdf26c3d08c4fd25602c8613 (patch)
treec123be30b03ba5614201b726143c7d3e6d500c98 /scripts
parentdocs: sysctl/kernel: document random (diff)
parentdocs: staging: use small font for literal includes (diff)
downloadlinux-435a77434653faabcdf26c3d08c4fd25602c8613.tar.gz
linux-435a77434653faabcdf26c3d08c4fd25602c8613.zip
Merge branch 'mauro' into docs-next
A big set of fixes and RST conversions from Mauro. He swears that this is the last RST conversion set, which is certainly cause for celebration.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index b4c963f8364e..e991d7f961e9 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1083,7 +1083,9 @@ sub dump_struct($$) {
$members =~ s/\s*__packed\s*/ /gos;
$members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos;
$members =~ s/\s*____cacheline_aligned_in_smp/ /gos;
+
# replace DECLARE_BITMAP
+ $members =~ s/__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, __ETHTOOL_LINK_MODE_MASK_NBITS)/gos;
$members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
# replace DECLARE_HASHTABLE
$members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos;
@@ -1769,6 +1771,11 @@ sub process_proto_function($$) {
$prototype =~ s@/\*.*?\*/@@gos; # strip comments.
$prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
$prototype =~ s@^\s+@@gos; # strip leading spaces
+
+ # Handle prototypes for function pointers like:
+ # int (*pcs_config)(struct foo)
+ $prototype =~ s@^(\S+\s+)\(\s*\*(\S+)\)@$1$2@gos;
+
if ($prototype =~ /SYSCALL_DEFINE/) {
syscall_munge();
}