Skip to contentSkip to conversation

checkpatch bailing out

DISCUSSION Arend van Spriel 2 participants 3 messages Mar 2, 2013 Checkpatch

lore
Share & tools
lore
#0 lore raw

With my laptop being broken I have to work on a server provided by my employer and I am preparing some patches for submission. So I intended to run checkpatch, but I get the following message after which the script bails out:

$ git format-patch -1 --stdout | scripts/checkpatch.pl -
Nested quantifiers in regex; marked by <-- HERE in m/(\((?:[^\(\)]++ <-- HERE |(?-1))*\))/ at scripts/checkpatch.pl line 347.

The server runs RHEL5

2.6.18-308.20.1.el5 #1 SMP x86_64 GNU/Linux

Perl interpreter:

$ /usr/bin/perl -v

This is perl, v5.8.8 built for x86_64-linux-thread-multi

My repository is based on wireless-testing repo.

Did a quick search on LKML, but not finding anything like this. Any help would be appreciated here.

Gr. AvS

maintainer
#1 lore raw
Quoted 15 lines · Arend van Spriel

With my laptop being broken I have to work on a server provided by my employer and I am preparing some patches for submission. So I intended to run checkpatch, but I get the following message after which the script bails out:

$ git format-patch -1 --stdout | scripts/checkpatch.pl -
Nested quantifiers in regex; marked by <-- HERE in m/(\((?:[^\(\)]++ <-- 
HERE |(?-1))*\))/ at scripts/checkpatch.pl line 347.

The server runs RHEL5

2.6.18-308.20.1.el5 #1 SMP x86_64 GNU/Linux

Perl interpreter:

Quoted 8 lines
$ /usr/bin/perl -v

This is perl, v5.8.8 built for x86_64-linux-thread-multi

My repository is based on wireless-testing repo.

Did a quick search on LKML, but not finding anything like this. Any help would be appreciated here.

Sorry, I don't have perl 5.8.8, it's pretty old.

Perhaps this explains it:
http://www.perlmonks.org/?node_id=971814 (question)
http://www.perlmonks.org/?node_id=971883 (explanation)

Perhaps you could test this patch?

---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
index b28cc38..fb53845 100755
@@ -344,7 +344,7 @@ our $Typecast	= qr{\s*(\(\s*$NonptrType\s*\)){0,1}\s*};
 # requires at least perl version v5.10.0
 # Any use must be runtime checked with $^V
 
-our $balanced_parens = qr/(\((?:[^\(\)]++|(?-1))*\))/;
+our $balanced_parens = qr/(\((?:(?>[^\(\)]+)|(?-1))*\))/;
 our $LvalOrFunc	= qr{($Lval)\s*($balanced_parens{0,1})\s*};
 our $FuncArg = qr{$Typecast{0,1}($LvalOrFunc|$Constant)};
 
#2 lore raw
Quoted 25 lines · Joe Perches
Quoted 15 lines · Arend van Spriel

With my laptop being broken I have to work on a server provided by my employer and I am preparing some patches for submission. So I intended to run checkpatch, but I get the following message after which the script bails out:

$ git format-patch -1 --stdout | scripts/checkpatch.pl -
Nested quantifiers in regex; marked by<-- HERE in m/(\((?:[^\(\)]++<--
HERE |(?-1))*\))/ at scripts/checkpatch.pl line 347.

The server runs RHEL5

2.6.18-308.20.1.el5 #1 SMP x86_64 GNU/Linux

Perl interpreter:

Quoted 8 lines
$ /usr/bin/perl -v

This is perl, v5.8.8 built for x86_64-linux-thread-multi

My repository is based on wireless-testing repo.

Did a quick search on LKML, but not finding anything like this. Any help would be appreciated here.

Quoted 7 lines

Sorry, I don't have perl 5.8.8, it's pretty old.

Perhaps this explains it:
http://www.perlmonks.org/?node_id=971814 (question)
http://www.perlmonks.org/?node_id=971883 (explanation)

Perhaps you could test this patch?

No luck. Fails on the same line although the message is different.

$ git format-patch -1 --stdout | scripts/checkpatch.pl -
Sequence (?-1...) not recognized in regex; marked by <-- HERE in m/(\((?:(?>[^\(\)]+)|(?-1 <-- HERE ))*\))/ at scripts/checkpatch.pl line 347.

scripts/checkpatch.pl our $Typecast = qr{\s*(\(\s*$NonptrType\s*\)){0,1}\s*}; · line 344

Quoted 10 lines
---
  scripts/checkpatch.pl | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +0 -0
index b28cc38..fb53845 100755
@@ -344,7 +344,7 @@ our $Typecast	= qr{\s*(\(\s*$NonptrType\s*\)){0,1}\s*};
  # requires at least perl version v5.10.0

Anyway, I will try to meet this requirement instead of chasing this. Thanks for looking into this.

Regards,
Arend