Skip to content

Commit ce8155f

Browse files
JoePerchestorvalds
authored andcommitted
get_maintainer: fix perl 5.22/5.24 deprecated/incompatible "\C" use
Perl 5.22 emits a deprecated message when "\C" is used in a regex. Perl 5.24 will disallow it altogether. Fix it by using [A-Z] instead of \C. Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Tested-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 364f68d commit ce8155f

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

‎scripts/get_maintainer.pl‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@
305305
while (<$maint>) {
306306
my $line = $_;
307307

308-
if ($line =~ m/^(\C):\s*(.*)/) {
308+
if ($line =~ m/^([A-Z]):\s*(.*)/) {
309309
my $type = $1;
310310
my $value = $2;
311311

@@ -550,7 +550,7 @@ sub range_is_maintained {
550550

551551
for (my $i = $start; $i < $end; $i++) {
552552
my $line = $typevalue[$i];
553-
if ($line =~ m/^(\C):\s*(.*)/) {
553+
if ($line =~ m/^([A-Z]):\s*(.*)/) {
554554
my $type = $1;
555555
my $value = $2;
556556
if ($type eq 'S') {
@@ -568,7 +568,7 @@ sub range_has_maintainer {
568568

569569
for (my $i = $start; $i < $end; $i++) {
570570
my $line = $typevalue[$i];
571-
if ($line =~ m/^(\C):\s*(.*)/) {
571+
if ($line =~ m/^([A-Z]):\s*(.*)/) {
572572
my $type = $1;
573573
my $value = $2;
574574
if ($type eq 'M') {
@@ -617,7 +617,7 @@ sub get_maintainers {
617617

618618
for ($i = $start; $i < $end; $i++) {
619619
my $line = $typevalue[$i];
620-
if ($line =~ m/^(\C):\s*(.*)/) {
620+
if ($line =~ m/^([A-Z]):\s*(.*)/) {
621621
my $type = $1;
622622
my $value = $2;
623623
if ($type eq 'X') {
@@ -632,7 +632,7 @@ sub get_maintainers {
632632
if (!$exclude) {
633633
for ($i = $start; $i < $end; $i++) {
634634
my $line = $typevalue[$i];
635-
if ($line =~ m/^(\C):\s*(.*)/) {
635+
if ($line =~ m/^([A-Z]):\s*(.*)/) {
636636
my $type = $1;
637637
my $value = $2;
638638
if ($type eq 'F') {
@@ -933,7 +933,7 @@ sub find_first_section {
933933

934934
while ($index < @typevalue) {
935935
my $tv = $typevalue[$index];
936-
if (($tv =~ m/^(\C):\s*(.*)/)) {
936+
if (($tv =~ m/^([A-Z]):\s*(.*)/)) {
937937
last;
938938
}
939939
$index++;
@@ -947,7 +947,7 @@ sub find_starting_index {
947947

948948
while ($index > 0) {
949949
my $tv = $typevalue[$index];
950-
if (!($tv =~ m/^(\C):\s*(.*)/)) {
950+
if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
951951
last;
952952
}
953953
$index--;
@@ -961,7 +961,7 @@ sub find_ending_index {
961961

962962
while ($index < @typevalue) {
963963
my $tv = $typevalue[$index];
964-
if (!($tv =~ m/^(\C):\s*(.*)/)) {
964+
if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
965965
last;
966966
}
967967
$index++;
@@ -987,7 +987,7 @@ sub get_maintainer_role {
987987

988988
for ($i = $start + 1; $i < $end; $i++) {
989989
my $tv = $typevalue[$i];
990-
if ($tv =~ m/^(\C):\s*(.*)/) {
990+
if ($tv =~ m/^([A-Z]):\s*(.*)/) {
991991
my $ptype = $1;
992992
my $pvalue = $2;
993993
if ($ptype eq "S") {
@@ -1046,7 +1046,7 @@ sub add_categories {
10461046

10471047
for ($i = $start + 1; $i < $end; $i++) {
10481048
my $tv = $typevalue[$i];
1049-
if ($tv =~ m/^(\C):\s*(.*)/) {
1049+
if ($tv =~ m/^([A-Z]):\s*(.*)/) {
10501050
my $ptype = $1;
10511051
my $pvalue = $2;
10521052
if ($ptype eq "L") {
@@ -1088,7 +1088,7 @@ sub add_categories {
10881088
if ($name eq "") {
10891089
if ($i > 0) {
10901090
my $tv = $typevalue[$i - 1];
1091-
if ($tv =~ m/^(\C):\s*(.*)/) {
1091+
if ($tv =~ m/^([A-Z]):\s*(.*)/) {
10921092
if ($1 eq "P") {
10931093
$name = $2;
10941094
$pvalue = format_email($name, $address, $email_usename);
@@ -1105,7 +1105,7 @@ sub add_categories {
11051105
if ($name eq "") {
11061106
if ($i > 0) {
11071107
my $tv = $typevalue[$i - 1];
1108-
if ($tv =~ m/^(\C):\s*(.*)/) {
1108+
if ($tv =~ m/^([A-Z]):\s*(.*)/) {
11091109
if ($1 eq "P") {
11101110
$name = $2;
11111111
$pvalue = format_email($name, $address, $email_usename);

0 commit comments

Comments
 (0)