Re: [PATCH] checkpatch: fix left brace warning

2016-01-26 Thread Geyslan G. Bem
Hello,

2015-12-30 12:49 GMT-03:00 Geyslan G. Bem :
> This patch escapes a regex that uses left brace.
>
> Using checkpatch.pl with Perl 5.22.0 generates the warning: "Unescaped
> left brace in regex is deprecated, passed through in regex;"
>
> Comment from regcomp.c in Perl source: "Currently we don't warn when the
> lbrace is at the start of a construct. This catches it in the middle of
> a literal string, or when it's the first thing after something like
> "\b"."
>
> This works as a complement to 4e5d56bd.
>
> Signed-off-by: Geyslan G. Bem 
> Suggested-by: Peter Senna Tschudin 
> ---
>  scripts/checkpatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index d4960f7..3e11a30 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -4108,7 +4108,7 @@ sub process {
>  ## }
>
>  #need space before brace following if, while, etc
> -   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
> +   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
> $line =~ /do\{/) {
> if (ERROR("SPACING",
>   "space required before the open brace 
> '{'\n" . $herecurr) &&
> --
> 2.6.4
>

This was acked?


-- 
Regards,

Geyslan G. Bem
hackingbits.com


Re: [PATCH] checkpatch: fix left brace warning

2016-01-26 Thread Geyslan G. Bem
Hello,

2015-12-30 12:49 GMT-03:00 Geyslan G. Bem :
> This patch escapes a regex that uses left brace.
>
> Using checkpatch.pl with Perl 5.22.0 generates the warning: "Unescaped
> left brace in regex is deprecated, passed through in regex;"
>
> Comment from regcomp.c in Perl source: "Currently we don't warn when the
> lbrace is at the start of a construct. This catches it in the middle of
> a literal string, or when it's the first thing after something like
> "\b"."
>
> This works as a complement to 4e5d56bd.
>
> Signed-off-by: Geyslan G. Bem 
> Suggested-by: Peter Senna Tschudin 
> ---
>  scripts/checkpatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index d4960f7..3e11a30 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -4108,7 +4108,7 @@ sub process {
>  ## }
>
>  #need space before brace following if, while, etc
> -   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
> +   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
> $line =~ /do\{/) {
> if (ERROR("SPACING",
>   "space required before the open brace 
> '{'\n" . $herecurr) &&
> --
> 2.6.4
>

This was acked?


-- 
Regards,

Geyslan G. Bem
hackingbits.com


[PATCH] checkpatch: fix left brace warning

2015-12-30 Thread Geyslan G. Bem
This patch escapes a regex that uses left brace.

Using checkpatch.pl with Perl 5.22.0 generates the warning: "Unescaped
left brace in regex is deprecated, passed through in regex;"

Comment from regcomp.c in Perl source: "Currently we don't warn when the
lbrace is at the start of a construct. This catches it in the middle of
a literal string, or when it's the first thing after something like
"\b"."

This works as a complement to 4e5d56bd.

Signed-off-by: Geyslan G. Bem 
Suggested-by: Peter Senna Tschudin 
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d4960f7..3e11a30 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4108,7 +4108,7 @@ sub process {
 ## }
 
 #need space before brace following if, while, etc
-   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
+   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
$line =~ /do\{/) {
if (ERROR("SPACING",
  "space required before the open brace '{'\n" 
. $herecurr) &&
-- 
2.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] checkpatch: fix left brace warning

2015-12-30 Thread Geyslan G. Bem
This patch escapes a regex that uses left brace.

Using checkpatch.pl with Perl 5.22.0 generates the warning: "Unescaped
left brace in regex is deprecated, passed through in regex;"

Comment from regcomp.c in Perl source: "Currently we don't warn when the
lbrace is at the start of a construct. This catches it in the middle of
a literal string, or when it's the first thing after something like
"\b"."

This works as a complement to 4e5d56bd.

Signed-off-by: Geyslan G. Bem 
Suggested-by: Peter Senna Tschudin 
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d4960f7..3e11a30 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4108,7 +4108,7 @@ sub process {
 ## }
 
 #need space before brace following if, while, etc
-   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
+   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
$line =~ /do\{/) {
if (ERROR("SPACING",
  "space required before the open brace '{'\n" 
. $herecurr) &&
-- 
2.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] checkpatch: Fix left brace warning

2015-08-06 Thread Joe Perches
On Wed, 2015-08-05 at 15:28 -0600, Eddie Kovsky wrote:
> Using checkpatch.pl with Perl 5.22.0 generates the following warning:
> 
> Unescaped left brace in regex is deprecated, passed through in regex;

Valdis Kletnieks sent a fix for this awhile ago:

https://lkml.org/lkml/2015/7/8/1049

Andrew can you apply it please?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] checkpatch: Fix left brace warning

2015-08-06 Thread Joe Perches
On Wed, 2015-08-05 at 15:28 -0600, Eddie Kovsky wrote:
 Using checkpatch.pl with Perl 5.22.0 generates the following warning:
 
 Unescaped left brace in regex is deprecated, passed through in regex;

Valdis Kletnieks sent a fix for this awhile ago:

https://lkml.org/lkml/2015/7/8/1049

Andrew can you apply it please?

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] checkpatch: Fix left brace warning

2015-08-05 Thread Eddie Kovsky
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 
---
 scripts/checkpatch.pl | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 50693f52d57c..a38fa70ce694 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3547,7 +3547,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) {
@@ -4059,8 +4059,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) {
@@ -4507,7 +4507,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*$//;
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] checkpatch: Fix left brace warning

2015-08-05 Thread Eddie Kovsky
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 e...@edkovsky.org
---
 scripts/checkpatch.pl | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 50693f52d57c..a38fa70ce694 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3547,7 +3547,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) {
@@ -4059,8 +4059,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) {
@@ -4507,7 +4507,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*$//;
-- 
2.5.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/