kernel-doc (a30a7a29c35ef9d90bdec86d3051c32f47d6041f) kernel-doc (5f8e4007c10d8f7a0f28be8a7894eb7712d0b111)
1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0
3# vim: softtabstop=4
4
5use warnings;
6use strict;
7
8## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##

--- 1137 unchanged lines hidden (view full) ---

1146 $members =~ s/\s*__packed\s*/ /gos;
1147 $members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos;
1148 $members =~ s/\s*____cacheline_aligned_in_smp/ /gos;
1149 $members =~ s/\s*____cacheline_aligned/ /gos;
1150 # unwrap struct_group():
1151 # - first eat non-declaration parameters and rewrite for final match
1152 # - then remove macro, outer parens, and trailing semicolon
1153 $members =~ s/\bstruct_group\s*\(([^,]*,)/STRUCT_GROUP(/gos;
1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0
3# vim: softtabstop=4
4
5use warnings;
6use strict;
7
8## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##

--- 1137 unchanged lines hidden (view full) ---

1146 $members =~ s/\s*__packed\s*/ /gos;
1147 $members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos;
1148 $members =~ s/\s*____cacheline_aligned_in_smp/ /gos;
1149 $members =~ s/\s*____cacheline_aligned/ /gos;
1150 # unwrap struct_group():
1151 # - first eat non-declaration parameters and rewrite for final match
1152 # - then remove macro, outer parens, and trailing semicolon
1153 $members =~ s/\bstruct_group\s*\(([^,]*,)/STRUCT_GROUP(/gos;
1154 $members =~ s/\bstruct_group_(attr|tagged)\s*\(([^,]*,){2}/STRUCT_GROUP(/gos;
1154 $members =~ s/\bstruct_group_attr\s*\(([^,]*,){2}/STRUCT_GROUP(/gos;
1155 $members =~ s/\bstruct_group_tagged\s*\(([^,]*),([^,]*),/struct $1 $2; STRUCT_GROUP(/gos;
1155 $members =~ s/\b__struct_group\s*\(([^,]*,){3}/STRUCT_GROUP(/gos;
1156 $members =~ s/\bSTRUCT_GROUP(\(((?:(?>[^)(]+)|(?1))*)\))[^;]*;/$2/gos;
1157
1158 my $args = qr{([^,)]+)};
1159 # replace DECLARE_BITMAP
1160 $members =~ s/__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, __ETHTOOL_LINK_MODE_MASK_NBITS)/gos;
1161 $members =~ s/DECLARE_PHY_INTERFACE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, PHY_INTERFACE_MODE_MAX)/gos;
1162 $members =~ s/DECLARE_BITMAP\s*\($args,\s*$args\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;

--- 1379 unchanged lines hidden ---
1156 $members =~ s/\b__struct_group\s*\(([^,]*,){3}/STRUCT_GROUP(/gos;
1157 $members =~ s/\bSTRUCT_GROUP(\(((?:(?>[^)(]+)|(?1))*)\))[^;]*;/$2/gos;
1158
1159 my $args = qr{([^,)]+)};
1160 # replace DECLARE_BITMAP
1161 $members =~ s/__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, __ETHTOOL_LINK_MODE_MASK_NBITS)/gos;
1162 $members =~ s/DECLARE_PHY_INTERFACE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, PHY_INTERFACE_MODE_MAX)/gos;
1163 $members =~ s/DECLARE_BITMAP\s*\($args,\s*$args\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;

--- 1379 unchanged lines hidden ---