Re: [lng-odp] [PATCH] checkpatch: fix left brace warning

2015-10-16 Thread Maxim Uvarov

Merged,
Maxim.

On 10/09/2015 15:16, Nicolas Morey-Chaisemartin wrote:

Using checkpatch.pl with Perl 5.22.0 generates the following warning:

 Unescaped left brace in regex is deprecated, passed through in regex;

This patch fixes the warnings by escaping occurrences of the left brace
inside the regular expression.

Signed-off-by: Eddie Kovsky 
Cc: Joe Perches 
Signed-off-by: Andrew Morton 
Signed-off-by: Linus Torvalds 
---
  scripts/checkpatch.pl | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 577241e..ba47dab 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3571,7 +3571,7 @@ sub process {
  # function brace can't be on same line, except for #defines of do while,
  # or if closed on same line
if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
-   !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) {
+   !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
if (ERROR("OPEN_BRACE",
  "open brace '{' following function declarations go on the 
next line\n" . $herecurr) &&
$fix) {
@@ -4083,8 +4083,8 @@ sub process {
  ##}
  
  #need space before brace following if, while, etc

-   if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
-   $line =~ /do{/) {
+   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
+   $line =~ /do\{/) {
if (ERROR("SPACING",
  "space required before the open brace '{'\n" . 
$herecurr) &&
$fix) {
@@ -4531,7 +4531,7 @@ sub process {
$dstat !~ /^for\s*$Constant$/ &&
# for (...)
$dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ 
&&   # for (...) bar()
$dstat !~ /^do\s*{/ &&  
# do {...
-   $dstat !~ /^\({/ && 
# ({...
+   $dstat !~ /^\(\{/ &&
# ({...
$ctx !~ 
/^.\s*#\s*define\s+TRACE_(?:SYSTEM|INCLUDE_FILE|INCLUDE_PATH)\b/)
{
$ctx =~ s/\n*$//;
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] checkpatch: fix left brace warning

2015-10-16 Thread Nicolas Morey-Chaisemartin


On 10/16/2015 02:39 PM, Mike Holmes wrote:
> Nicolas should you have added you sign-off since you added to our code base
> ?

I wasn't sure about the policy. Concerning checkpatch, I'd trust these people 
signoff over mine ;)
Anyway maxim added his so it should be alright
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] checkpatch: fix left brace warning

2015-10-16 Thread Maxim Uvarov

On 10/16/2015 15:39, Mike Holmes wrote:
Nicolas should you have added you sign-off since you added to our code 
base ?


ah, I missed that. But added mine.

Maxim.


On 16 October 2015 at 08:01, Maxim Uvarov > wrote:


Merged,
Maxim.


On 10/09/2015 15:16, Nicolas Morey-Chaisemartin wrote:

Using checkpatch.pl  with Perl 5.22.0
generates the following warning:

 Unescaped left brace in regex is deprecated, passed
through in regex;

This patch fixes the warnings by escaping occurrences of the
left brace
inside the regular expression.

Signed-off-by: Eddie Kovsky >
Cc: Joe Perches >
Signed-off-by: Andrew Morton >
Signed-off-by: Linus Torvalds >
---
  scripts/checkpatch.pl  | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/checkpatch.pl 
b/scripts/checkpatch.pl 
index 577241e..ba47dab 100755
--- a/scripts/checkpatch.pl 
+++ b/scripts/checkpatch.pl 
@@ -3571,7 +3571,7 @@ sub process {
  # function brace can't be on same line, except for #defines
of do while,
  # or if closed on same line
if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
-   !($line=~/\#\s*define.*do\s{/) and
!($line=~/}/)) {
+   !($line=~/\#\s*define.*do\s\{/) and
!($line=~/}/)) {
if (ERROR("OPEN_BRACE",
  "open brace '{' following
function declarations go on the next line\n" . $herecurr) &&
$fix) {
@@ -4083,8 +4083,8 @@ sub process {
  ##}
#need space before brace following if, while, etc
-   if (($line =~ /\(.*\){/ && $line !~
/\($Type\){/) ||
-   $line =~ /do{/) {
+   if (($line =~ /\(.*\)\{/ && $line !~
/\($Type\){/) ||
+   $line =~ /do\{/) {
if (ERROR("SPACING",
  "space required before the
open brace '{'\n" . $herecurr) &&
$fix) {
@@ -4531,7 +4531,7 @@ sub process {
$dstat !~ /^for\s*$Constant$/ &&  
  # for (...)

$dstat !~
/^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ &&   # for (...)
bar()
$dstat !~ /^do\s*{/ &&   
  # do {...
-   $dstat !~ /^\({/ &&   
 # ({...

+   $dstat !~ /^\(\{/ && # ({...
$ctx !~
/^.\s*#\s*define\s+TRACE_(?:SYSTEM|INCLUDE_FILE|INCLUDE_PATH)\b/)
{
$ctx =~ s/\n*$//;
___
lng-odp mailing list
lng-odp@lists.linaro.org 
https://lists.linaro.org/mailman/listinfo/lng-odp


___
lng-odp mailing list
lng-odp@lists.linaro.org 
https://lists.linaro.org/mailman/listinfo/lng-odp




--
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org ***│ *Open source software for ARM SoCs



___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] checkpatch: fix left brace warning

2015-10-16 Thread Mike Holmes
Nicolas should you have added you sign-off since you added to our code base
?

On 16 October 2015 at 08:01, Maxim Uvarov  wrote:

> Merged,
> Maxim.
>
>
> On 10/09/2015 15:16, Nicolas Morey-Chaisemartin wrote:
>
>> Using checkpatch.pl with Perl 5.22.0 generates the following warning:
>>
>>  Unescaped left brace in regex is deprecated, passed through in regex;
>>
>> This patch fixes the warnings by escaping occurrences of the left brace
>> inside the regular expression.
>>
>> Signed-off-by: Eddie Kovsky 
>> Cc: Joe Perches 
>> Signed-off-by: Andrew Morton 
>> Signed-off-by: Linus Torvalds 
>> ---
>>   scripts/checkpatch.pl | 8 
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 577241e..ba47dab 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -3571,7 +3571,7 @@ sub process {
>>   # function brace can't be on same line, except for #defines of do while,
>>   # or if closed on same line
>> if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
>> -   !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) {
>> +   !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
>> if (ERROR("OPEN_BRACE",
>>   "open brace '{' following function
>> declarations go on the next line\n" . $herecurr) &&
>> $fix) {
>> @@ -4083,8 +4083,8 @@ sub process {
>>   ##}
>> #need space before brace following if, while, etc
>> -   if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
>> -   $line =~ /do{/) {
>> +   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
>> +   $line =~ /do\{/) {
>> if (ERROR("SPACING",
>>   "space required before the open brace
>> '{'\n" . $herecurr) &&
>> $fix) {
>> @@ -4531,7 +4531,7 @@ sub process {
>> $dstat !~ /^for\s*$Constant$/ &&
>>   # for (...)
>> $dstat !~
>> /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ &&   # for (...) bar()
>> $dstat !~ /^do\s*{/ &&
>>   # do {...
>> -   $dstat !~ /^\({/ &&
>># ({...
>> +   $dstat !~ /^\(\{/ &&
>>   # ({...
>> $ctx !~
>> /^.\s*#\s*define\s+TRACE_(?:SYSTEM|INCLUDE_FILE|INCLUDE_PATH)\b/)
>> {
>> $ctx =~ s/\n*$//;
>> ___
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>



-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org  *│ *Open source software for ARM SoCs
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] checkpatch: fix left brace warning

2015-10-09 Thread Nicolas Morey-Chaisemartin
Using checkpatch.pl with Perl 5.22.0 generates the following warning:

Unescaped left brace in regex is deprecated, passed through in regex;

This patch fixes the warnings by escaping occurrences of the left brace
inside the regular expression.

Signed-off-by: Eddie Kovsky 
Cc: Joe Perches 
Signed-off-by: Andrew Morton 
Signed-off-by: Linus Torvalds 
---
 scripts/checkpatch.pl | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 577241e..ba47dab 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3571,7 +3571,7 @@ sub process {
 # function brace can't be on same line, except for #defines of do while,
 # or if closed on same line
if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
-   !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) {
+   !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
if (ERROR("OPEN_BRACE",
  "open brace '{' following function 
declarations go on the next line\n" . $herecurr) &&
$fix) {
@@ -4083,8 +4083,8 @@ sub process {
 ## }
 
 #need space before brace following if, while, etc
-   if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
-   $line =~ /do{/) {
+   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
+   $line =~ /do\{/) {
if (ERROR("SPACING",
  "space required before the open brace '{'\n" 
. $herecurr) &&
$fix) {
@@ -4531,7 +4531,7 @@ sub process {
$dstat !~ /^for\s*$Constant$/ &&
# for (...)
$dstat !~ 
/^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ &&   # for (...) bar()
$dstat !~ /^do\s*{/ &&  
# do {...
-   $dstat !~ /^\({/ && 
# ({...
+   $dstat !~ /^\(\{/ &&
# ({...
$ctx !~ 
/^.\s*#\s*define\s+TRACE_(?:SYSTEM|INCLUDE_FILE|INCLUDE_PATH)\b/)
{
$ctx =~ s/\n*$//;
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp