* [PATCH] get_maintainer: Fix perl 5.22/5.24 deprecated/incompatible "\C" use
@ 2015-06-19 0:47 Joe Perches
0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2015-06-19 0:47 UTC (permalink / raw)
To: Andrew Morton; +Cc: Valdis Kletnieks, LKML
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>
---
scripts/get_maintainer.pl | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index fc169fd..8b3b0ca 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -304,7 +304,7 @@ open (my $maint, '<', "${lk_path}MAINTAINERS")
while (<$maint>) {
my $line = $_;
- if ($line =~ m/^(\C):\s*(.*)/) {
+ if ($line =~ m/^([A-Z]):\s*(.*)/) {
my $type = $1;
my $value = $2;
@@ -549,7 +549,7 @@ sub range_is_maintained {
for (my $i = $start; $i < $end; $i++) {
my $line = $typevalue[$i];
- if ($line =~ m/^(\C):\s*(.*)/) {
+ if ($line =~ m/^([A-Z]):\s*(.*)/) {
my $type = $1;
my $value = $2;
if ($type eq 'S') {
@@ -567,7 +567,7 @@ sub range_has_maintainer {
for (my $i = $start; $i < $end; $i++) {
my $line = $typevalue[$i];
- if ($line =~ m/^(\C):\s*(.*)/) {
+ if ($line =~ m/^([A-Z]):\s*(.*)/) {
my $type = $1;
my $value = $2;
if ($type eq 'M') {
@@ -616,7 +616,7 @@ sub get_maintainers {
for ($i = $start; $i < $end; $i++) {
my $line = $typevalue[$i];
- if ($line =~ m/^(\C):\s*(.*)/) {
+ if ($line =~ m/^([A-Z]):\s*(.*)/) {
my $type = $1;
my $value = $2;
if ($type eq 'X') {
@@ -631,7 +631,7 @@ sub get_maintainers {
if (!$exclude) {
for ($i = $start; $i < $end; $i++) {
my $line = $typevalue[$i];
- if ($line =~ m/^(\C):\s*(.*)/) {
+ if ($line =~ m/^([A-Z]):\s*(.*)/) {
my $type = $1;
my $value = $2;
if ($type eq 'F') {
@@ -932,7 +932,7 @@ sub find_first_section {
while ($index < @typevalue) {
my $tv = $typevalue[$index];
- if (($tv =~ m/^(\C):\s*(.*)/)) {
+ if (($tv =~ m/^([A-Z]):\s*(.*)/)) {
last;
}
$index++;
@@ -946,7 +946,7 @@ sub find_starting_index {
while ($index > 0) {
my $tv = $typevalue[$index];
- if (!($tv =~ m/^(\C):\s*(.*)/)) {
+ if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
last;
}
$index--;
@@ -960,7 +960,7 @@ sub find_ending_index {
while ($index < @typevalue) {
my $tv = $typevalue[$index];
- if (!($tv =~ m/^(\C):\s*(.*)/)) {
+ if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
last;
}
$index++;
@@ -986,7 +986,7 @@ sub get_maintainer_role {
for ($i = $start + 1; $i < $end; $i++) {
my $tv = $typevalue[$i];
- if ($tv =~ m/^(\C):\s*(.*)/) {
+ if ($tv =~ m/^([A-Z]):\s*(.*)/) {
my $ptype = $1;
my $pvalue = $2;
if ($ptype eq "S") {
@@ -1045,7 +1045,7 @@ sub add_categories {
for ($i = $start + 1; $i < $end; $i++) {
my $tv = $typevalue[$i];
- if ($tv =~ m/^(\C):\s*(.*)/) {
+ if ($tv =~ m/^([A-Z]):\s*(.*)/) {
my $ptype = $1;
my $pvalue = $2;
if ($ptype eq "L") {
@@ -1087,7 +1087,7 @@ sub add_categories {
if ($name eq "") {
if ($i > 0) {
my $tv = $typevalue[$i - 1];
- if ($tv =~ m/^(\C):\s*(.*)/) {
+ if ($tv =~ m/^([A-Z]):\s*(.*)/) {
if ($1 eq "P") {
$name = $2;
$pvalue = format_email($name, $address, $email_usename);
@@ -1104,7 +1104,7 @@ sub add_categories {
if ($name eq "") {
if ($i > 0) {
my $tv = $typevalue[$i - 1];
- if ($tv =~ m/^(\C):\s*(.*)/) {
+ if ($tv =~ m/^([A-Z]):\s*(.*)/) {
if ($1 eq "P") {
$name = $2;
$pvalue = format_email($name, $address, $email_usename);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] get_maintainer: fix perl 5.22/5.24 deprecated/incompatible "\C" use
@ 2015-11-19 8:43 Olaf Hering
2015-11-24 16:52 ` Ian Campbell
0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2015-11-19 8:43 UTC (permalink / raw)
To: xen-devel; +Cc: Keir Fraser, Ian Jackson, Ian Campbell, Jan Beulich, Tim Deegan
From: Joe Perches <joe@perches.com>
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.
[ Upstream commit ce8155f7a3d59ce868ea16d8891edda4d865e873 ]
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Cc: Tim Deegan <tim@xen.org>
---
scripts/get_maintainer.pl | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index cc445cd..9fda278 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -277,7 +277,7 @@ open (my $maint, '<', "${xen_path}MAINTAINERS")
while (<$maint>) {
my $line = $_;
- if ($line =~ m/^(\C):\s*(.*)/) {
+ if ($line =~ m/^([A-Z]):\s*(.*)/) {
my $type = $1;
my $value = $2;
@@ -512,7 +512,7 @@ sub range_is_maintained {
for (my $i = $start; $i < $end; $i++) {
my $line = $typevalue[$i];
- if ($line =~ m/^(\C):\s*(.*)/) {
+ if ($line =~ m/^([A-Z]):\s*(.*)/) {
my $type = $1;
my $value = $2;
if ($type eq 'S') {
@@ -530,7 +530,7 @@ sub range_has_maintainer {
for (my $i = $start; $i < $end; $i++) {
my $line = $typevalue[$i];
- if ($line =~ m/^(\C):\s*(.*)/) {
+ if ($line =~ m/^([A-Z]):\s*(.*)/) {
my $type = $1;
my $value = $2;
if ($type eq 'M') {
@@ -579,7 +579,7 @@ sub get_maintainers {
for ($i = $start; $i < $end; $i++) {
my $line = $typevalue[$i];
- if ($line =~ m/^(\C):\s*(.*)/) {
+ if ($line =~ m/^([A-Z]):\s*(.*)/) {
my $type = $1;
my $value = $2;
if ($type eq 'X') {
@@ -594,7 +594,7 @@ sub get_maintainers {
if (!$exclude) {
for ($i = $start; $i < $end; $i++) {
my $line = $typevalue[$i];
- if ($line =~ m/^(\C):\s*(.*)/) {
+ if ($line =~ m/^([A-Z]):\s*(.*)/) {
my $type = $1;
my $value = $2;
if ($type eq 'F') {
@@ -897,7 +897,7 @@ sub find_first_section {
while ($index < @typevalue) {
my $tv = $typevalue[$index];
- if (($tv =~ m/^(\C):\s*(.*)/)) {
+ if (($tv =~ m/^([A-Z]):\s*(.*)/)) {
last;
}
$index++;
@@ -911,7 +911,7 @@ sub find_starting_index {
while ($index > 0) {
my $tv = $typevalue[$index];
- if (!($tv =~ m/^(\C):\s*(.*)/)) {
+ if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
last;
}
$index--;
@@ -925,7 +925,7 @@ sub find_ending_index {
while ($index < @typevalue) {
my $tv = $typevalue[$index];
- if (!($tv =~ m/^(\C):\s*(.*)/)) {
+ if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
last;
}
$index++;
@@ -951,7 +951,7 @@ sub get_maintainer_role {
for ($i = $start + 1; $i < $end; $i++) {
my $tv = $typevalue[$i];
- if ($tv =~ m/^(\C):\s*(.*)/) {
+ if ($tv =~ m/^([A-Z]):\s*(.*)/) {
my $ptype = $1;
my $pvalue = $2;
if ($ptype eq "S") {
@@ -1010,7 +1010,7 @@ sub add_categories {
for ($i = $start + 1; $i < $end; $i++) {
my $tv = $typevalue[$i];
- if ($tv =~ m/^(\C):\s*(.*)/) {
+ if ($tv =~ m/^([A-Z]):\s*(.*)/) {
my $ptype = $1;
my $pvalue = $2;
if ($ptype eq "L") {
@@ -1052,7 +1052,7 @@ sub add_categories {
if ($name eq "") {
if ($i > 0) {
my $tv = $typevalue[$i - 1];
- if ($tv =~ m/^(\C):\s*(.*)/) {
+ if ($tv =~ m/^([A-Z]):\s*(.*)/) {
if ($1 eq "P") {
$name = $2;
$pvalue = format_email($name, $address, $email_usename);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] get_maintainer: fix perl 5.22/5.24 deprecated/incompatible "\C" use
2015-11-19 8:43 [PATCH] get_maintainer: fix perl 5.22/5.24 deprecated/incompatible "\C" use Olaf Hering
@ 2015-11-24 16:52 ` Ian Campbell
0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2015-11-24 16:52 UTC (permalink / raw)
To: Olaf Hering, xen-devel; +Cc: Keir Fraser, Ian Jackson, Jan Beulich, Tim Deegan
On Thu, 2015-11-19 at 08:43 +0000, Olaf Hering wrote:
> From: Joe Perches <joe@perches.com>
>
> 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.
They aren't quite equivalent, but [A-Z] suffices for the usage here.
> [ Upstream commit ce8155f7a3d59ce868ea16d8891edda4d865e873 ]
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked + applied.
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Keir Fraser <keir@xen.org>
> Cc: Tim Deegan <tim@xen.org>
> ---
> scripts/get_maintainer.pl | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
> index cc445cd..9fda278 100755
> --- a/scripts/get_maintainer.pl
> +++ b/scripts/get_maintainer.pl
> @@ -277,7 +277,7 @@ open (my $maint, '<', "${xen_path}MAINTAINERS")
> while (<$maint>) {
> my $line = $_;
>
> - if ($line =~ m/^(\C):\s*(.*)/) {
> + if ($line =~ m/^([A-Z]):\s*(.*)/) {
> my $type = $1;
> my $value = $2;
>
> @@ -512,7 +512,7 @@ sub range_is_maintained {
>
> for (my $i = $start; $i < $end; $i++) {
> my $line = $typevalue[$i];
> - if ($line =~ m/^(\C):\s*(.*)/) {
> + if ($line =~ m/^([A-Z]):\s*(.*)/) {
> my $type = $1;
> my $value = $2;
> if ($type eq 'S') {
> @@ -530,7 +530,7 @@ sub range_has_maintainer {
>
> for (my $i = $start; $i < $end; $i++) {
> my $line = $typevalue[$i];
> - if ($line =~ m/^(\C):\s*(.*)/) {
> + if ($line =~ m/^([A-Z]):\s*(.*)/) {
> my $type = $1;
> my $value = $2;
> if ($type eq 'M') {
> @@ -579,7 +579,7 @@ sub get_maintainers {
>
> for ($i = $start; $i < $end; $i++) {
> my $line = $typevalue[$i];
> - if ($line =~ m/^(\C):\s*(.*)/) {
> + if ($line =~ m/^([A-Z]):\s*(.*)/) {
> my $type = $1;
> my $value = $2;
> if ($type eq 'X') {
> @@ -594,7 +594,7 @@ sub get_maintainers {
> if (!$exclude) {
> for ($i = $start; $i < $end; $i++) {
> my $line = $typevalue[$i];
> - if ($line =~ m/^(\C):\s*(.*)/) {
> + if ($line =~ m/^([A-Z]):\s*(.*)/) {
> my $type = $1;
> my $value = $2;
> if ($type eq 'F') {
> @@ -897,7 +897,7 @@ sub find_first_section {
>
> while ($index < @typevalue) {
> my $tv = $typevalue[$index];
> - if (($tv =~ m/^(\C):\s*(.*)/)) {
> + if (($tv =~ m/^([A-Z]):\s*(.*)/)) {
> last;
> }
> $index++;
> @@ -911,7 +911,7 @@ sub find_starting_index {
>
> while ($index > 0) {
> my $tv = $typevalue[$index];
> - if (!($tv =~ m/^(\C):\s*(.*)/)) {
> + if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
> last;
> }
> $index--;
> @@ -925,7 +925,7 @@ sub find_ending_index {
>
> while ($index < @typevalue) {
> my $tv = $typevalue[$index];
> - if (!($tv =~ m/^(\C):\s*(.*)/)) {
> + if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
> last;
> }
> $index++;
> @@ -951,7 +951,7 @@ sub get_maintainer_role {
>
> for ($i = $start + 1; $i < $end; $i++) {
> my $tv = $typevalue[$i];
> - if ($tv =~ m/^(\C):\s*(.*)/) {
> + if ($tv =~ m/^([A-Z]):\s*(.*)/) {
> my $ptype = $1;
> my $pvalue = $2;
> if ($ptype eq "S") {
> @@ -1010,7 +1010,7 @@ sub add_categories {
>
> for ($i = $start + 1; $i < $end; $i++) {
> my $tv = $typevalue[$i];
> - if ($tv =~ m/^(\C):\s*(.*)/) {
> + if ($tv =~ m/^([A-Z]):\s*(.*)/) {
> my $ptype = $1;
> my $pvalue = $2;
> if ($ptype eq "L") {
> @@ -1052,7 +1052,7 @@ sub add_categories {
> if ($name eq "") {
> if ($i > 0) {
> my $tv = $typevalue[$i - 1];
> - if ($tv =~ m/^(\C):\s*(.*)/) {
> + if ($tv =~ m/^([A-Z]):\s*(.*)/) {
> if ($1 eq "P") {
> $name = $2;
> $pvalue = format_email($name, $address,
> $email_usename);
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-24 16:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19 8:43 [PATCH] get_maintainer: fix perl 5.22/5.24 deprecated/incompatible "\C" use Olaf Hering
2015-11-24 16:52 ` Ian Campbell
-- strict thread matches above, loose matches on Subject: below --
2015-06-19 0:47 [PATCH] get_maintainer: Fix " Joe Perches
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.