kernel-doc (2b5f78e5e942d76e5497f53c2298900224b52c51) | kernel-doc (f861537d5f856f8bffc7ddd1f9c1a59bfed0012a) |
---|---|
1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 1048 unchanged lines hidden (view full) --- 1057sub dump_union($$) { 1058 dump_struct(@_); 1059} 1060 1061sub dump_struct($$) { 1062 my $x = shift; 1063 my $file = shift; 1064 | 1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 1048 unchanged lines hidden (view full) --- 1057sub dump_union($$) { 1058 dump_struct(@_); 1059} 1060 1061sub dump_struct($$) { 1062 my $x = shift; 1063 my $file = shift; 1064 |
1065 if ($x =~ /(struct|union)\s+(\w+)\s*\{(.*)\}(\s*(__packed|__aligned|__attribute__\s*\(\([a-z0-9,_\s\(\)]*\)\)))*/) { | 1065 if ($x =~ /(struct|union)\s+(\w+)\s*\{(.*)\}(\s*(__packed|__aligned|____cacheline_aligned_in_smp|__attribute__\s*\(\([a-z0-9,_\s\(\)]*\)\)))*/) { |
1066 my $decl_type = $1; 1067 $declaration_name = $2; 1068 my $members = $3; 1069 1070 # ignore members marked private: 1071 $members =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gosi; 1072 $members =~ s/\/\*\s*private:.*//gosi; 1073 # strip comments: 1074 $members =~ s/\/\*.*?\*\///gos; 1075 # strip attributes 1076 $members =~ s/\s*__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)/ /gi; 1077 $members =~ s/\s*__aligned\s*\([^;]*\)/ /gos; 1078 $members =~ s/\s*__packed\s*/ /gos; 1079 $members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos; | 1066 my $decl_type = $1; 1067 $declaration_name = $2; 1068 my $members = $3; 1069 1070 # ignore members marked private: 1071 $members =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gosi; 1072 $members =~ s/\/\*\s*private:.*//gosi; 1073 # strip comments: 1074 $members =~ s/\/\*.*?\*\///gos; 1075 # strip attributes 1076 $members =~ s/\s*__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)/ /gi; 1077 $members =~ s/\s*__aligned\s*\([^;]*\)/ /gos; 1078 $members =~ s/\s*__packed\s*/ /gos; 1079 $members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos; |
1080 $members =~ s/\s*____cacheline_aligned_in_smp/ /gos; |
|
1080 # replace DECLARE_BITMAP 1081 $members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos; 1082 # replace DECLARE_HASHTABLE 1083 $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos; 1084 # replace DECLARE_KFIFO 1085 $members =~ s/DECLARE_KFIFO\s*\(([^,)]+),\s*([^,)]+),\s*([^,)]+)\)/$2 \*$1/gos; 1086 # replace DECLARE_KFIFO_PTR 1087 $members =~ s/DECLARE_KFIFO_PTR\s*\(([^,)]+),\s*([^,)]+)\)/$2 \*$1/gos; --- 1139 unchanged lines hidden --- | 1081 # replace DECLARE_BITMAP 1082 $members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos; 1083 # replace DECLARE_HASHTABLE 1084 $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos; 1085 # replace DECLARE_KFIFO 1086 $members =~ s/DECLARE_KFIFO\s*\(([^,)]+),\s*([^,)]+),\s*([^,)]+)\)/$2 \*$1/gos; 1087 # replace DECLARE_KFIFO_PTR 1088 $members =~ s/DECLARE_KFIFO_PTR\s*\(([^,)]+),\s*([^,)]+)\)/$2 \*$1/gos; --- 1139 unchanged lines hidden --- |